Hi Ray,
When you say "200 IPM rapid back up" I assume you didn't mean to say "rapid" as in G0? It would help to just list the G code.
All we are using here is the Z axis correct?
Your settings are pretty aggressive with acceleration of 25 in/sec2. I calculate to move 0.1 inches will only take 0.12 seconds with infinite Jerk (what Mach3 always uses). So that explains why "rapids" with KMotionCNC is slower. With Jerk limit it takes about 0.27 seconds. I often just enter the numbers into the Step Response Screen to visually see the profile.
But I don't understand why feed moves (infinite Jerk) would be different between Mach3 and KMotionCNC. I would capture and plot the data to see which is correct.
Yes by all means wire the encoder back to KFLOP to be able to plot the servo performance.
Regards
TK
Group: DynoMotion |
Message: 3685 |
From: himykabibble |
Date: 2/2/2012 |
Subject: Re: Can You Verify My Settings? |
Tom,
The code is the following two lines repeated many time:
G01 Z-0.1 F30
G00 Z0.0
The velocity and acceleration settings are what I've been using ever since I built the machine over 3 years ago. Never a problem. In fact, it's capable of more, it's just too scary to crank things up any higher.
Can you explain why KMotionCNC would behave differently from my app? That's the one that really makes no sense to me. I can accept that the servo tuning is not perfect (though it's worked perfectly all these years), but I can't understand why KMotionCNC would not exactly duplicate what my app does, unless the settings in my program are wrong.
Regards,
Ray L.
--- In DynoMotion@yahoogroups.com, Tom Kerekes <tk@...> wrote:
>
> Hi Ray,
> Â
> When you say "200 IPM rapid back up" I assume you didn't mean to say "rapid" as in G0? It would help to just list the G code.
> Â
> All we are using here is the Z axis correct?
> Â
> Your settings are pretty aggressive with acceleration of 25 in/sec2. I calculate to move 0.1 inches will only take 0.12 seconds with infinite Jerk (what Mach3 always uses). So that explains why "rapids" with KMotionCNC is slower. With Jerk limit it takes about 0.27 seconds. I often just enter the numbers into the Step Response Screen to visually see the profile.
> Â
> But I don't understand why feed moves (infinite Jerk) would be different between Mach3 and KMotionCNC. I would capture and plot the data to see which is correct.
> Â
> Yes by all means wire the encoder back to KFLOP to be able to plot the servo performance.
> Â
> Regards
> TKÂ
>
> From: himykabibble <jagboy@...>
> To: DynoMotion@yahoogroups.com
> Sent: Thursday, February 2, 2012 6:12 PM
> Subject: [DynoMotion] Can You Verify My Settings?
>
>
> Â
> Tom,
>
> I tried to actually use my machine with my new app today. The good news is the app did nothing unexpected, and I can tell I will really like the UI once it's a bit more polished. One of the things I added last night was I now output the tool table into my G-code, and the G-code loader in my app now finds it, and pushes it into the interpreter automatically. I will make a tool length database, and hook it into that, so the current tool length settings will be automatically updated each time the program is loaded.
>
> However, on the first part I tried to cut today, I found it losing position on the quill when doing peck drilling. This always occurred on the up-move. After digging into this a bit, I came up with a simple test program that does a short feed move down at F30, then a 200 IPM rapid back up to the start position. It just does this over, and over, and over. When I run this with my app, I get *constant* faults on the quill servo (something I've never seen in 3 years with this machine). When I run it under KMotionCNC, with what *should* be the same settings, I get occasional faults. When I run it under Mach3 (still with the KFlop), I get no faults.
>
> Why would I get a different result running my app vs KMotionCNC? Or even Mach3 for that matter? I believe the settings are exactly the same, as follows:
>
> X/Y Steps/Inch: 20000
> X/Y Vel: 200 IPM | 66667 counts/sec
> X/Y Accel: 25 in/sec^2 | 500000counts/sec^2
> X/Y Jerk: 2E6
>
> Z Steps/Inch: 20320
> Z Vel: 150 IPM/50800 counts/sec
> Z Accel: 25 in/sec^2 | 508000 counts/sec*2
> Z Jerk: 2E6
>
> A Steps/Inch: 96000
> A Vel: 50 IPM | 80000
> A Accel: 5 in/sec^2 | 480000
> A Jerk: 2E6
>
> Any ideas?
>
> One significant difference I noted between running with Mach3 and running with KMotion - I changed the program to be a 100IPM feed down to -0.1, then a rapid back up to 0.0. If I run this under Mach3, the quill moves up and down VERY quickly, probably making 2-3 cycles/second. Under KMotionCNC and my app, the time to complete each down and up cycle is probably 2-3X what it is in Mach3 - completing no more than one cycle per second.
>
> Regards,
> Ray L.
>
|
|
Group: DynoMotion |
Message: 3687 |
From: himykabibble |
Date: 2/3/2012 |
Subject: Re: Can You Verify My Settings? |
Tom,
I'm stumped here.... If I do:
G00 Z-0.5
G00 Z0.0
with acceleration at 25in/sec^2, jerk at 20E6, it will run HUNDREDS of cycles, never skipping a beat. I have . But, if I do:
G01 Z-0.5 F150
G01 Z0.0
even with acceleration reduced by a factor of 5 (to 5in/sec^2), and jerk reduced to 2E5, it faults the servo on EVERY move, and the axis never moves! What is going on here?
This is the same behavior I've been seeing on my knee - where G0s work perfectly, but when I try to jog with the pendant, I can very easily get faults, even at very low speeds. None of the axes on this machine have ever faulted in the past, unless I ran them into an immovable object.
Regards,
Ray L.
--- In DynoMotion@yahoogroups.com, "himykabibble" <jagboy@...> wrote:
>
> Tom,
>
> The code is the following two lines repeated many time:
>
> G01 Z-0.1 F30
> G00 Z0.0
>
> The velocity and acceleration settings are what I've been using ever since I built the machine over 3 years ago. Never a problem. In fact, it's capable of more, it's just too scary to crank things up any higher.
>
> Can you explain why KMotionCNC would behave differently from my app? That's the one that really makes no sense to me. I can accept that the servo tuning is not perfect (though it's worked perfectly all these years), but I can't understand why KMotionCNC would not exactly duplicate what my app does, unless the settings in my program are wrong.
>
> Regards,
> Ray L.
>
> --- In DynoMotion@yahoogroups.com, Tom Kerekes <tk@> wrote:
> >
> > Hi Ray,
> > Â
> > When you say "200 IPM rapid back up" I assume you didn't mean to say "rapid" as in G0? It would help to just list the G code.
> > Â
> > All we are using here is the Z axis correct?
> > Â
> > Your settings are pretty aggressive with acceleration of 25 in/sec2. I calculate to move 0.1 inches will only take 0.12 seconds with infinite Jerk (what Mach3 always uses). So that explains why "rapids" with KMotionCNC is slower. With Jerk limit it takes about 0.27 seconds. I often just enter the numbers into the Step Response Screen to visually see the profile.
> > Â
> > But I don't understand why feed moves (infinite Jerk) would be different between Mach3 and KMotionCNC. I would capture and plot the data to see which is correct.
> > Â
> > Yes by all means wire the encoder back to KFLOP to be able to plot the servo performance.
> > Â
> > Regards
> > TKÂ
> >
> > From: himykabibble <jagboy@>
> > To: DynoMotion@yahoogroups.com
> > Sent: Thursday, February 2, 2012 6:12 PM
> > Subject: [DynoMotion] Can You Verify My Settings?
> >
> >
> > Â
> > Tom,
> >
> > I tried to actually use my machine with my new app today. The good news is the app did nothing unexpected, and I can tell I will really like the UI once it's a bit more polished. One of the things I added last night was I now output the tool table into my G-code, and the G-code loader in my app now finds it, and pushes it into the interpreter automatically. I will make a tool length database, and hook it into that, so the current tool length settings will be automatically updated each time the program is loaded.
> >
> > However, on the first part I tried to cut today, I found it losing position on the quill when doing peck drilling. This always occurred on the up-move. After digging into this a bit, I came up with a simple test program that does a short feed move down at F30, then a 200 IPM rapid back up to the start position. It just does this over, and over, and over. When I run this with my app, I get *constant* faults on the quill servo (something I've never seen in 3 years with this machine). When I run it under KMotionCNC, with what *should* be the same settings, I get occasional faults. When I run it under Mach3 (still with the KFlop), I get no faults.
> >
> > Why would I get a different result running my app vs KMotionCNC? Or even Mach3 for that matter? I believe the settings are exactly the same, as follows:
> >
> > X/Y Steps/Inch: 20000
> > X/Y Vel: 200 IPM | 66667 counts/sec
> > X/Y Accel: 25 in/sec^2 | 500000counts/sec^2
> > X/Y Jerk: 2E6
> >
> > Z Steps/Inch: 20320
> > Z Vel: 150 IPM/50800 counts/sec
> > Z Accel: 25 in/sec^2 | 508000 counts/sec*2
> > Z Jerk: 2E6
> >
> > A Steps/Inch: 96000
> > A Vel: 50 IPM | 80000
> > A Accel: 5 in/sec^2 | 480000
> > A Jerk: 2E6
> >
> > Any ideas?
> >
> > One significant difference I noted between running with Mach3 and running with KMotion - I changed the program to be a 100IPM feed down to -0.1, then a rapid back up to 0.0. If I run this under Mach3, the quill moves up and down VERY quickly, probably making 2-3 cycles/second. Under KMotionCNC and my app, the time to complete each down and up cycle is probably 2-3X what it is in Mach3 - completing no more than one cycle per second.
> >
> > Regards,
> > Ray L.
> >
>
|
|
Group: DynoMotion |
Message: 3689 |
From: himykabibble |
Date: 2/3/2012 |
Subject: Re: Can You Verify My Settings? |
Just a little more data:
I increased velocity to 200 IPM (67733), acceleration to 35 in/sec^2 (700000), and jerk to 2E12, and I get VERY rare faults when running G0s - perhaps one every few hundred cycles. This is perfectly consistent with what I saw when I first setup the system with Mach3. With the 5X reduced settings in my previous post, I still get CONSTANT faults running G1s, even with the Feedrate specified as only 15 IPM. Why is the response to G1s so radically different from G0s?
Unfortunately, no easy way to wire encoders in, as I'm using the encoder pins for other things, and I'm not keen on re-wiring just now. But, it seems to me the fact that I can run such aggressive parameters with G0s indicates the servo tuning is not all that far from optimal.
Regards,
Ray L.
--- In DynoMotion@yahoogroups.com, "himykabibble" <jagboy@...> wrote:
>
> Tom,
>
> I'm stumped here.... If I do:
>
> G00 Z-0.5
> G00 Z0.0
>
> with acceleration at 25in/sec^2, jerk at 20E6, it will run HUNDREDS of cycles, never skipping a beat. I have . But, if I do:
>
> G01 Z-0.5 F150
> G01 Z0.0
>
> even with acceleration reduced by a factor of 5 (to 5in/sec^2), and jerk reduced to 2E5, it faults the servo on EVERY move, and the axis never moves! What is going on here?
>
> This is the same behavior I've been seeing on my knee - where G0s work perfectly, but when I try to jog with the pendant, I can very easily get faults, even at very low speeds. None of the axes on this machine have ever faulted in the past, unless I ran them into an immovable object.
>
> Regards,
> Ray L.
>
> --- In DynoMotion@yahoogroups.com, "himykabibble" <jagboy@> wrote:
> >
> > Tom,
> >
> > The code is the following two lines repeated many time:
> >
> > G01 Z-0.1 F30
> > G00 Z0.0
> >
> > The velocity and acceleration settings are what I've been using ever since I built the machine over 3 years ago. Never a problem. In fact, it's capable of more, it's just too scary to crank things up any higher.
> >
> > Can you explain why KMotionCNC would behave differently from my app? That's the one that really makes no sense to me. I can accept that the servo tuning is not perfect (though it's worked perfectly all these years), but I can't understand why KMotionCNC would not exactly duplicate what my app does, unless the settings in my program are wrong.
> >
> > Regards,
> > Ray L.
> >
> > --- In DynoMotion@yahoogroups.com, Tom Kerekes <tk@> wrote:
> > >
> > > Hi Ray,
> > > Â
> > > When you say "200 IPM rapid back up" I assume you didn't mean to say "rapid" as in G0? It would help to just list the G code.
> > > Â
> > > All we are using here is the Z axis correct?
> > > Â
> > > Your settings are pretty aggressive with acceleration of 25 in/sec2. I calculate to move 0.1 inches will only take 0.12 seconds with infinite Jerk (what Mach3 always uses). So that explains why "rapids" with KMotionCNC is slower. With Jerk limit it takes about 0.27 seconds. I often just enter the numbers into the Step Response Screen to visually see the profile.
> > > Â
> > > But I don't understand why feed moves (infinite Jerk) would be different between Mach3 and KMotionCNC. I would capture and plot the data to see which is correct.
> > > Â
> > > Yes by all means wire the encoder back to KFLOP to be able to plot the servo performance.
> > > Â
> > > Regards
> > > TKÂ
> > >
> > > From: himykabibble <jagboy@>
> > > To: DynoMotion@yahoogroups.com
> > > Sent: Thursday, February 2, 2012 6:12 PM
> > > Subject: [DynoMotion] Can You Verify My Settings?
> > >
> > >
> > > Â
> > > Tom,
> > >
> > > I tried to actually use my machine with my new app today. The good news is the app did nothing unexpected, and I can tell I will really like the UI once it's a bit more polished. One of the things I added last night was I now output the tool table into my G-code, and the G-code loader in my app now finds it, and pushes it into the interpreter automatically. I will make a tool length database, and hook it into that, so the current tool length settings will be automatically updated each time the program is loaded.
> > >
> > > However, on the first part I tried to cut today, I found it losing position on the quill when doing peck drilling. This always occurred on the up-move. After digging into this a bit, I came up with a simple test program that does a short feed move down at F30, then a 200 IPM rapid back up to the start position. It just does this over, and over, and over. When I run this with my app, I get *constant* faults on the quill servo (something I've never seen in 3 years with this machine). When I run it under KMotionCNC, with what *should* be the same settings, I get occasional faults. When I run it under Mach3 (still with the KFlop), I get no faults.
> > >
> > > Why would I get a different result running my app vs KMotionCNC? Or even Mach3 for that matter? I believe the settings are exactly the same, as follows:
> > >
> > > X/Y Steps/Inch: 20000
> > > X/Y Vel: 200 IPM | 66667 counts/sec
> > > X/Y Accel: 25 in/sec^2 | 500000counts/sec^2
> > > X/Y Jerk: 2E6
> > >
> > > Z Steps/Inch: 20320
> > > Z Vel: 150 IPM/50800 counts/sec
> > > Z Accel: 25 in/sec^2 | 508000 counts/sec*2
> > > Z Jerk: 2E6
> > >
> > > A Steps/Inch: 96000
> > > A Vel: 50 IPM | 80000
> > > A Accel: 5 in/sec^2 | 480000
> > > A Jerk: 2E6
> > >
> > > Any ideas?
> > >
> > > One significant difference I noted between running with Mach3 and running with KMotion - I changed the program to be a 100IPM feed down to -0.1, then a rapid back up to 0.0. If I run this under Mach3, the quill moves up and down VERY quickly, probably making 2-3 cycles/second. Under KMotionCNC and my app, the time to complete each down and up cycle is probably 2-3X what it is in Mach3 - completing no more than one cycle per second.
> > >
> > > Regards,
> > > Ray L.
> > >
> >
>
|
|
Group: DynoMotion |
Message: 3690 |
From: Tom Kerekes |
Date: 2/3/2012 |
Subject: Re: Can You Verify My Settings? |
Hi Ray,
Sounds like a bug. Is that from your code? Maybe some parameter is not being set? You will probably have to step into the code to figure it out. Otherwise capture the output motion to see what the really acceleration is.
Which connectors are you using. You can multiplex the encoder inputs to JP4 and JP6 if that helps.
Regards
TK
Group: DynoMotion |
Message: 3691 |
From: himykabibble |
Date: 2/3/2012 |
Subject: Re: Can You Verify My Settings? |
Tom,
I just tried KMotionCNC again, and it is NOT having this problem, which suggests to me I'm either not doing some essential initialization, or there's a bug in dotNet, and it;s not doing the requested initialization correctly. Both my app and KMotionCNC are using the exact same Init.c, so my init code and dotNet appear to me to be the only variables, as the only other thing my app is doing is passing the G-code file to the interpreter.
Am I doing the right init? Am I doing it at the right time???
Kinda smells like the axis parameters are not "taking", since changing acceleration and velocity all over the map makes NO difference in the behavior.
Below is ALL of the init I'm doing in my app, other than loading the Init.c. This is all done when the first connection is established on app startup. If the connection is lost, only Init.c is re-loaded when the connection comes back.
private void InitAxes()
{
// Define the axes
KMAxes = new Dictionary<string, KMotion_dotNet.KM_Axis>();
KMAxes.Add("XAxis", new KMotion_dotNet.KM_Axis(KMController, 0, "XAxis"));
KMAxes.Add("YAxis", new KMotion_dotNet.KM_Axis(KMController, 1, "YAxis"));
KMAxes.Add("ZAxis", new KMotion_dotNet.KM_Axis(KMController, 2, "ZAxis"));
KMAxes.Add("AAxis", new KMotion_dotNet.KM_Axis(KMController, 3, "AAxis"));
KMController.AxisChannels = KMAxes;
KMController.CoordMotion.Abort();
KMController.CoordMotion.ClearAbort();
KMController.CoordMotion.MotionParams.CountsPerInchX = StepsPerInchX;
KMController.CoordMotion.MotionParams.MaxVelX = MaxVelX;
KMController.CoordMotion.MotionParams.MaxAccelX = AccelX;
KMController.WriteLine("EnableAxis0");
KMController.CoordMotion.MotionParams.CountsPerInchY = StepsPerInchY;
KMController.CoordMotion.MotionParams.MaxVelY = MaxVelY;
KMController.CoordMotion.MotionParams.MaxAccelY = AccelY;
KMController.WriteLine("EnableAxis1");
KMController.CoordMotion.MotionParams.CountsPerInchZ = StepsPerInchZ;
KMController.CoordMotion.MotionParams.MaxVelZ = MaxVelZ;
KMController.CoordMotion.MotionParams.MaxAccelZ = AccelZ;
KMController.WriteLine("EnableAxis2");
KMController.CoordMotion.MotionParams.CountsPerInchA = StepsPerInchA;
KMController.CoordMotion.MotionParams.MaxVelA = MaxVelA;
KMController.CoordMotion.MotionParams.MaxAccelA = AccelA;
KMController.WriteLine("EnableAxis3");
KMController.WriteLine("DefineCS = 0 1 2 3 -1 -1");
}
public void InterpreterInit()
{
KMController.Interpreter.Interpreter_CoordMotionStraightFeed +=
new KM_CoordMotionStraightFeedHandler(Interpreter_Interpreter_CoordMotionStraightFeed);
KMController.Interpreter.Interpreter_CoordMotionStraightTraverse +=
new KM_CoordMotionStraightTraverseHandler(Interpreter_Interpreter_CoordMotionStraightTraverse);
KMController.Interpreter.Interpreter_CoordMotionArcFeed +=
new KM_CoordMotionArcFeedHandler(Interpreter_Interpreter_CoordMotionArcFeed);
KMController.Interpreter.InterpreterCompleted +=
new KM_Controller.KM_Interpreter.KM_GCodeInterpreterCompleteHandler(Interpreter_InterpreterCompleted);
KMController.Interpreter.InterpreterStatusUpdated +=
new KM_Controller.KM_Interpreter.KM_GCodeInterpreterStatusHandler(Interpreter_InterpreterStatusUpdated);
KMController.Interpreter.MainPathRoot = @"C:\KMotion428";
KMController.Interpreter.CountsPerInchX = StepsPerInchX;
KMController.Interpreter.MaxVelX = MaxVelX;
KMController.Interpreter.MaxAccelX = AccelX;
KMController.Interpreter.CountsPerInchY = StepsPerInchY;
KMController.Interpreter.MaxVelY = MaxVelY;
KMController.Interpreter.MaxAccelY = AccelY;
KMController.Interpreter.CountsPerInchZ = StepsPerInchZ;
KMController.Interpreter.MaxVelZ = MaxVelZ;
KMController.Interpreter.MaxAccelZ = AccelZ;
KMController.Interpreter.CountsPerInchA = StepsPerInchA;
KMController.Interpreter.MaxVelA = MaxVelA;
KMController.Interpreter.MaxAccelA = AccelA;
KMController.Interpreter.BreakAngle = 30;
KMController.Interpreter.SetupParams.LengthUnits = KMotion_dotNet.CANON_UNITS.CANON_UNITS_INCHES;
KMController.Interpreter.SetupParams.X_AxisOffset = 0.0;
KMController.Interpreter.SetupParams.Y_AxisOffset = 0.0;
KMController.Interpreter.SetupParams.Z_AxisOffset = 0.0;
KMController.Interpreter.SetupParams.BlockDelete = true;
KMController.Interpreter.SetupParams.RadiusCompSide = KMotion_dotNet.CANON_SIDE.CANON_SIDE_OFF;
KMController.Interpreter.SetupParams.Cycle_R = 0.0;
KMController.Interpreter.SetupParams.Cycle_Z = 0.0;
KMController.Interpreter.SetupParams.DistanceMode = KMotion_dotNet.DISTANCE_MODE.MODE_ABSOLUTE;
KMController.Interpreter.SetupParams.FeedMode = 2;
KMController.Interpreter.SetupParams.FloodCoolantOn = false;
KMController.Interpreter.SetupParams.MistCoolantOn = false;
KMController.Interpreter.SetupParams.CurrentMotionMode = 80;
KMController.Interpreter.SetupParams.WorkPlane = KMotion_dotNet.CANON_PLANE.CANON_PLANE_XY;
KMController.Interpreter.SetupParams.ToolLengthOffsetIndex = 1;
KMController.Interpreter.SetupParams.RadiusComp = 1;
KMController.Interpreter.SetupParams.SelectedToolSlot = 1;
KMController.Interpreter.SetupParams.TraverseSpeed = 200;
KMController.Interpreter.SetupParams.SpindleDirection = KMotion_dotNet.CANON_DIRECTION.CANON_STOPPED;
KMController.Interpreter.SetupParams.ToolLengthOffset = 0.0;
KMController.Interpreter.SetMcodeAction(3, MCODE_TYPE.M_Action_SetTwoBits, 27, 1, 28, 0, 0, "SpindleCW");
KMController.Interpreter.SetMcodeAction(4, MCODE_TYPE.M_Action_SetTwoBits, 27, 0, 28, 1, 0, "SpindleCCW");
KMController.Interpreter.SetMcodeAction(5, MCODE_TYPE.M_Action_SetTwoBits, 27, 0, 28, 0, 0, "SpindleOff");
KMController.Interpreter.SetMcodeAction(7, MCODE_TYPE.M_Action_Setbit, 3, 1, 0, 0, 0, "MistOn");
KMController.Interpreter.SetMcodeAction(8, MCODE_TYPE.M_Action_Setbit, 4, 1, 0, 0, 0, "FloodOn");
KMController.Interpreter.SetMcodeAction(9, MCODE_TYPE.M_Action_SetTwoBits, 3, 0, 4, 0, 0, "CoolantOff");
KMController.Interpreter.SetMcodeAction(10, MCODE_TYPE.M_Action_Program, 2, 4, 0, 0, 0, @"C:\My KFlop C Programs\KMotionCNC\KMotionCNCSpindlePWM.c");
KMController.Interpreter.SetMcodeAction(21, MCODE_TYPE.M_Action_Program, 4, 10, 28, 0, 0, @"C:\My KFlop C Programs\KMotionCNC\KMotionCNCMCodeHandler.c");
KMController.Interpreter.InitializeOnExecute = false;
KMController.Interpreter.InitializeInterpreter();
InterpreterInitialized = true;
RunCommand(@"C:\KMotion428\GCode Programs\Init.nc", "G20 F0 S0 G54", true);
while (InterpreterIsRunning)
;
}
Regards,
Ray L.
--- In DynoMotion@yahoogroups.com, Tom Kerekes <tk@...> wrote:
>
> Hi Ray,
> Â
> Sounds like a bug. Is that from your code? Maybe some parameter is not being set? You will probably have to step into the code to figure it out. Otherwise capture the output motion to see what the really acceleration is.
> Â
> Which connectors are you using. You can multiplex the encoder inputs to JP4 and JP6 if that helps.
> Â
> Regards
> TK
>
>
> ________________________________
> From: himykabibble <jagboy@...>
> To: DynoMotion@yahoogroups.com
> Sent: Friday, February 3, 2012 9:14 AM
> Subject: [DynoMotion] Re: Can You Verify My Settings?
>
>
> Â
> Just a little more data:
>
> I increased velocity to 200 IPM (67733), acceleration to 35 in/sec^2 (700000), and jerk to 2E12, and I get VERY rare faults when running G0s - perhaps one every few hundred cycles. This is perfectly consistent with what I saw when I first setup the system with Mach3. With the 5X reduced settings in my previous post, I still get CONSTANT faults running G1s, even with the Feedrate specified as only 15 IPM. Why is the response to G1s so radically different from G0s?
>
> Unfortunately, no easy way to wire encoders in, as I'm using the encoder pins for other things, and I'm not keen on re-wiring just now. But, it seems to me the fact that I can run such aggressive parameters with G0s indicates the servo tuning is not all that far from optimal.
>
> Regards,
> Ray L.
>
> --- In DynoMotion@yahoogroups.com, "himykabibble" <jagboy@> wrote:
> >
> > Tom,
> >
> > I'm stumped here.... If I do:
> >
> > G00 Z-0.5
> > G00 Z0.0
> >
> > with acceleration at 25in/sec^2, jerk at 20E6, it will run HUNDREDS of cycles, never skipping a beat. I have . But, if I do:
> >
> > G01 Z-0.5 F150
> > G01 Z0.0
> >
> > even with acceleration reduced by a factor of 5 (to 5in/sec^2), and jerk reduced to 2E5, it faults the servo on EVERY move, and the axis never moves! What is going on here?
> >
> > This is the same behavior I've been seeing on my knee - where G0s work perfectly, but when I try to jog with the pendant, I can very easily get faults, even at very low speeds. None of the axes on this machine have ever faulted in the past, unless I ran them into an immovable object.
> >
> > Regards,
> > Ray L.
> >
> > --- In DynoMotion@yahoogroups.com, "himykabibble" <jagboy@> wrote:
> > >
> > > Tom,
> > >
> > > The code is the following two lines repeated many time:
> > >
> > > G01 Z-0.1 F30
> > > G00 Z0.0
> > >
> > > The velocity and acceleration settings are what I've been using ever since I built the machine over 3 years ago. Never a problem. In fact, it's capable of more, it's just too scary to crank things up any higher.
> > >
> > > Can you explain why KMotionCNC would behave differently from my app? That's the one that really makes no sense to me. I can accept that the servo tuning is not perfect (though it's worked perfectly all these years), but I can't understand why KMotionCNC would not exactly duplicate what my app does, unless the settings in my program are wrong.
> > >
> > > Regards,
> > > Ray L.
> > >
> > > --- In DynoMotion@yahoogroups.com, Tom Kerekes <tk@> wrote:
> > > >
> > > > Hi Ray,
> > > > ÃÂ
> > > > When you say "200ÃÂ IPM rapid back up" I assume youÃÂ didn't mean to say "rapid" as in G0?ÃÂ It would help to just list the G code.
> > > > ÃÂ
> > > > All we are using here is the Z axis correct?
> > > > ÃÂ
> > > > Your settings are pretty aggressive with acceleration of 25 in/sec2.ÃÂ I calculate to move 0.1 inches will only take 0.12 seconds with infinite Jerk (what Mach3 always uses).ÃÂ So that explains why "rapids" with KMotionCNC is slower.ÃÂ With Jerk limit it takes about 0.27 seconds.ÃÂ I often just enter the numbers into the Step Response Screen to visually see the profile.
> > > > ÃÂ
> > > > But I don't understand why feed moves (infinite Jerk) would be different between Mach3 and KMotionCNC.ÃÂ I would capture and plot the data to see which is correct.
> > > > ÃÂ
> > > > Yes by all means wire the encoder back to KFLOP to be able to plot the servo performance.
> > > > ÃÂ
> > > > Regards
> > > > TKÃÂ
> > > >
> > > > From: himykabibble <jagboy@>
> > > > To: DynoMotion@yahoogroups.com
> > > > Sent: Thursday, February 2, 2012 6:12 PM
> > > > Subject: [DynoMotion] Can You Verify My Settings?
> > > >
> > > >
> > > > ÃÂ
> > > > Tom,
> > > >
> > > > I tried to actually use my machine with my new app today. The good news is the app did nothing unexpected, and I can tell I will really like the UI once it's a bit more polished. One of the things I added last night was I now output the tool table into my G-code, and the G-code loader in my app now finds it, and pushes it into the interpreter automatically. I will make a tool length database, and hook it into that, so the current tool length settings will be automatically updated each time the program is loaded.
> > > >
> > > > However, on the first part I tried to cut today, I found it losing position on the quill when doing peck drilling. This always occurred on the up-move. After digging into this a bit, I came up with a simple test program that does a short feed move down at F30, then a 200 IPM rapid back up to the start position. It just does this over, and over, and over. When I run this with my app, I get *constant* faults on the quill servo (something I've never seen in 3 years with this machine). When I run it under KMotionCNC, with what *should* be the same settings, I get occasional faults. When I run it under Mach3 (still with the KFlop), I get no faults.
> > > >
> > > > Why would I get a different result running my app vs KMotionCNC? Or even Mach3 for that matter? I believe the settings are exactly the same, as follows:
> > > >
> > > > X/Y Steps/Inch: 20000
> > > > X/Y Vel: 200 IPM | 66667 counts/sec
> > > > X/Y Accel: 25 in/sec^2 | 500000counts/sec^2
> > > > X/Y Jerk: 2E6
> > > >
> > > > Z Steps/Inch: 20320
> > > > Z Vel: 150 IPM/50800 counts/sec
> > > > Z Accel: 25 in/sec^2 | 508000 counts/sec*2
> > > > Z Jerk: 2E6
> > > >
> > > > A Steps/Inch: 96000
> > > > A Vel: 50 IPM | 80000
> > > > A Accel: 5 in/sec^2 | 480000
> > > > A Jerk: 2E6
> > > >
> > > > Any ideas?
> > > >
> > > > One significant difference I noted between running with Mach3 and running with KMotion - I changed the program to be a 100IPM feed down to -0.1, then a rapid back up to 0.0. If I run this under Mach3, the quill moves up and down VERY quickly, probably making 2-3 cycles/second. Under KMotionCNC and my app, the time to complete each down and up cycle is probably 2-3X what it is in Mach3 - completing no more than one cycle per second.
> > > >
> > > > Regards,
> > > > Ray L.
> > > >
> > >
> >
>
|
|
Group: DynoMotion |
Message: 3694 |
From: himykabibble |
Date: 2/3/2012 |
Subject: Re: Can You Verify My Settings? |
Well, my vote is dotNet is not loading the settings correctly. I can change the values I pass all over the map, from ridiculously high to ridiculously low, and it makes NO difference whatsoever in how the machine behaves....
Regards,
Ray L.
--- In DynoMotion@yahoogroups.com, "himykabibble" <jagboy@...> wrote:
>
> Tom,
>
> I just tried KMotionCNC again, and it is NOT having this problem, which suggests to me I'm either not doing some essential initialization, or there's a bug in dotNet, and it;s not doing the requested initialization correctly. Both my app and KMotionCNC are using the exact same Init.c, so my init code and dotNet appear to me to be the only variables, as the only other thing my app is doing is passing the G-code file to the interpreter.
>
> Am I doing the right init? Am I doing it at the right time???
>
> Kinda smells like the axis parameters are not "taking", since changing acceleration and velocity all over the map makes NO difference in the behavior.
>
> Below is ALL of the init I'm doing in my app, other than loading the Init.c. This is all done when the first connection is established on app startup. If the connection is lost, only Init.c is re-loaded when the connection comes back.
>
> private void InitAxes()
> {
> // Define the axes
> KMAxes = new Dictionary<string, KMotion_dotNet.KM_Axis>();
> KMAxes.Add("XAxis", new KMotion_dotNet.KM_Axis(KMController, 0, "XAxis"));
> KMAxes.Add("YAxis", new KMotion_dotNet.KM_Axis(KMController, 1, "YAxis"));
> KMAxes.Add("ZAxis", new KMotion_dotNet.KM_Axis(KMController, 2, "ZAxis"));
> KMAxes.Add("AAxis", new KMotion_dotNet.KM_Axis(KMController, 3, "AAxis"));
>
> KMController.AxisChannels = KMAxes;
>
> KMController.CoordMotion.Abort();
> KMController.CoordMotion.ClearAbort();
>
> KMController.CoordMotion.MotionParams.CountsPerInchX = StepsPerInchX;
> KMController.CoordMotion.MotionParams.MaxVelX = MaxVelX;
> KMController.CoordMotion.MotionParams.MaxAccelX = AccelX;
> KMController.WriteLine("EnableAxis0");
>
> KMController.CoordMotion.MotionParams.CountsPerInchY = StepsPerInchY;
> KMController.CoordMotion.MotionParams.MaxVelY = MaxVelY;
> KMController.CoordMotion.MotionParams.MaxAccelY = AccelY;
> KMController.WriteLine("EnableAxis1");
>
> KMController.CoordMotion.MotionParams.CountsPerInchZ = StepsPerInchZ;
> KMController.CoordMotion.MotionParams.MaxVelZ = MaxVelZ;
> KMController.CoordMotion.MotionParams.MaxAccelZ = AccelZ;
> KMController.WriteLine("EnableAxis2");
>
> KMController.CoordMotion.MotionParams.CountsPerInchA = StepsPerInchA;
> KMController.CoordMotion.MotionParams.MaxVelA = MaxVelA;
> KMController.CoordMotion.MotionParams.MaxAccelA = AccelA;
> KMController.WriteLine("EnableAxis3");
>
> KMController.WriteLine("DefineCS = 0 1 2 3 -1 -1");
> }
>
> public void InterpreterInit()
> {
> KMController.Interpreter.Interpreter_CoordMotionStraightFeed +=
> new KM_CoordMotionStraightFeedHandler(Interpreter_Interpreter_CoordMotionStraightFeed);
> KMController.Interpreter.Interpreter_CoordMotionStraightTraverse +=
> new KM_CoordMotionStraightTraverseHandler(Interpreter_Interpreter_CoordMotionStraightTraverse);
> KMController.Interpreter.Interpreter_CoordMotionArcFeed +=
> new KM_CoordMotionArcFeedHandler(Interpreter_Interpreter_CoordMotionArcFeed);
> KMController.Interpreter.InterpreterCompleted +=
> new KM_Controller.KM_Interpreter.KM_GCodeInterpreterCompleteHandler(Interpreter_InterpreterCompleted);
> KMController.Interpreter.InterpreterStatusUpdated +=
> new KM_Controller.KM_Interpreter.KM_GCodeInterpreterStatusHandler(Interpreter_InterpreterStatusUpdated);
>
> KMController.Interpreter.MainPathRoot = @"C:\KMotion428";
>
> KMController.Interpreter.CountsPerInchX = StepsPerInchX;
> KMController.Interpreter.MaxVelX = MaxVelX;
> KMController.Interpreter.MaxAccelX = AccelX;
>
> KMController.Interpreter.CountsPerInchY = StepsPerInchY;
> KMController.Interpreter.MaxVelY = MaxVelY;
> KMController.Interpreter.MaxAccelY = AccelY;
>
> KMController.Interpreter.CountsPerInchZ = StepsPerInchZ;
> KMController.Interpreter.MaxVelZ = MaxVelZ;
> KMController.Interpreter.MaxAccelZ = AccelZ;
>
> KMController.Interpreter.CountsPerInchA = StepsPerInchA;
> KMController.Interpreter.MaxVelA = MaxVelA;
> KMController.Interpreter.MaxAccelA = AccelA;
>
> KMController.Interpreter.BreakAngle = 30;
>
> KMController.Interpreter.SetupParams.LengthUnits = KMotion_dotNet.CANON_UNITS.CANON_UNITS_INCHES;
> KMController.Interpreter.SetupParams.X_AxisOffset = 0.0;
> KMController.Interpreter.SetupParams.Y_AxisOffset = 0.0;
> KMController.Interpreter.SetupParams.Z_AxisOffset = 0.0;
>
> KMController.Interpreter.SetupParams.BlockDelete = true;
>
> KMController.Interpreter.SetupParams.RadiusCompSide = KMotion_dotNet.CANON_SIDE.CANON_SIDE_OFF;
> KMController.Interpreter.SetupParams.Cycle_R = 0.0;
> KMController.Interpreter.SetupParams.Cycle_Z = 0.0;
>
> KMController.Interpreter.SetupParams.DistanceMode = KMotion_dotNet.DISTANCE_MODE.MODE_ABSOLUTE;
>
> KMController.Interpreter.SetupParams.FeedMode = 2;
>
> KMController.Interpreter.SetupParams.FloodCoolantOn = false;
> KMController.Interpreter.SetupParams.MistCoolantOn = false;
>
> KMController.Interpreter.SetupParams.CurrentMotionMode = 80;
>
> KMController.Interpreter.SetupParams.WorkPlane = KMotion_dotNet.CANON_PLANE.CANON_PLANE_XY;
>
> KMController.Interpreter.SetupParams.ToolLengthOffsetIndex = 1;
> KMController.Interpreter.SetupParams.RadiusComp = 1;
>
> KMController.Interpreter.SetupParams.SelectedToolSlot = 1;
> KMController.Interpreter.SetupParams.TraverseSpeed = 200;
> KMController.Interpreter.SetupParams.SpindleDirection = KMotion_dotNet.CANON_DIRECTION.CANON_STOPPED;
> KMController.Interpreter.SetupParams.ToolLengthOffset = 0.0;
>
> KMController.Interpreter.SetMcodeAction(3, MCODE_TYPE.M_Action_SetTwoBits, 27, 1, 28, 0, 0, "SpindleCW");
> KMController.Interpreter.SetMcodeAction(4, MCODE_TYPE.M_Action_SetTwoBits, 27, 0, 28, 1, 0, "SpindleCCW");
> KMController.Interpreter.SetMcodeAction(5, MCODE_TYPE.M_Action_SetTwoBits, 27, 0, 28, 0, 0, "SpindleOff");
> KMController.Interpreter.SetMcodeAction(7, MCODE_TYPE.M_Action_Setbit, 3, 1, 0, 0, 0, "MistOn");
> KMController.Interpreter.SetMcodeAction(8, MCODE_TYPE.M_Action_Setbit, 4, 1, 0, 0, 0, "FloodOn");
> KMController.Interpreter.SetMcodeAction(9, MCODE_TYPE.M_Action_SetTwoBits, 3, 0, 4, 0, 0, "CoolantOff");
> KMController.Interpreter.SetMcodeAction(10, MCODE_TYPE.M_Action_Program, 2, 4, 0, 0, 0, @"C:\My KFlop C Programs\KMotionCNC\KMotionCNCSpindlePWM.c");
> KMController.Interpreter.SetMcodeAction(21, MCODE_TYPE.M_Action_Program, 4, 10, 28, 0, 0, @"C:\My KFlop C Programs\KMotionCNC\KMotionCNCMCodeHandler.c");
>
> KMController.Interpreter.InitializeOnExecute = false;
> KMController.Interpreter.InitializeInterpreter();
>
> InterpreterInitialized = true;
>
> RunCommand(@"C:\KMotion428\GCode Programs\Init.nc", "G20 F0 S0 G54", true);
>
> while (InterpreterIsRunning)
> ;
> }
>
> Regards,
> Ray L.
>
>
> --- In DynoMotion@yahoogroups.com, Tom Kerekes <tk@> wrote:
> >
> > Hi Ray,
> > Â
> > Sounds like a bug. Is that from your code? Maybe some parameter is not being set? You will probably have to step into the code to figure it out. Otherwise capture the output motion to see what the really acceleration is.
> > Â
> > Which connectors are you using. You can multiplex the encoder inputs to JP4 and JP6 if that helps.
> > Â
> > Regards
> > TK
> >
> >
> > ________________________________
> > From: himykabibble <jagboy@>
> > To: DynoMotion@yahoogroups.com
> > Sent: Friday, February 3, 2012 9:14 AM
> > Subject: [DynoMotion] Re: Can You Verify My Settings?
> >
> >
> > Â
> > Just a little more data:
> >
> > I increased velocity to 200 IPM (67733), acceleration to 35 in/sec^2 (700000), and jerk to 2E12, and I get VERY rare faults when running G0s - perhaps one every few hundred cycles. This is perfectly consistent with what I saw when I first setup the system with Mach3. With the 5X reduced settings in my previous post, I still get CONSTANT faults running G1s, even with the Feedrate specified as only 15 IPM. Why is the response to G1s so radically different from G0s?
> >
> > Unfortunately, no easy way to wire encoders in, as I'm using the encoder pins for other things, and I'm not keen on re-wiring just now. But, it seems to me the fact that I can run such aggressive parameters with G0s indicates the servo tuning is not all that far from optimal.
> >
> > Regards,
> > Ray L.
> >
> > --- In DynoMotion@yahoogroups.com, "himykabibble" <jagboy@> wrote:
> > >
> > > Tom,
> > >
> > > I'm stumped here.... If I do:
> > >
> > > G00 Z-0.5
> > > G00 Z0.0
> > >
> > > with acceleration at 25in/sec^2, jerk at 20E6, it will run HUNDREDS of cycles, never skipping a beat. I have . But, if I do:
> > >
> > > G01 Z-0.5 F150
> > > G01 Z0.0
> > >
> > > even with acceleration reduced by a factor of 5 (to 5in/sec^2), and jerk reduced to 2E5, it faults the servo on EVERY move, and the axis never moves! What is going on here?
> > >
> > > This is the same behavior I've been seeing on my knee - where G0s work perfectly, but when I try to jog with the pendant, I can very easily get faults, even at very low speeds. None of the axes on this machine have ever faulted in the past, unless I ran them into an immovable object.
> > >
> > > Regards,
> > > Ray L.
> > >
> > > --- In DynoMotion@yahoogroups.com, "himykabibble" <jagboy@> wrote:
> > > >
> > > > Tom,
> > > >
> > > > The code is the following two lines repeated many time:
> > > >
> > > > G01 Z-0.1 F30
> > > > G00 Z0.0
> > > >
> > > > The velocity and acceleration settings are what I've been using ever since I built the machine over 3 years ago. Never a problem. In fact, it's capable of more, it's just too scary to crank things up any higher.
> > > >
> > > > Can you explain why KMotionCNC would behave differently from my app? That's the one that really makes no sense to me. I can accept that the servo tuning is not perfect (though it's worked perfectly all these years), but I can't understand why KMotionCNC would not exactly duplicate what my app does, unless the settings in my program are wrong.
> > > >
> > > > Regards,
> > > > Ray L.
> > > >
> > > > --- In DynoMotion@yahoogroups.com, Tom Kerekes <tk@> wrote:
> > > > >
> > > > > Hi Ray,
> > > > > ÃÂ
> > > > > When you say "200ÃÂ IPM rapid back up" I assume youÃÂ didn't mean to say "rapid" as in G0?ÃÂ It would help to just list the G code.
> > > > > ÃÂ
> > > > > All we are using here is the Z axis correct?
> > > > > ÃÂ
> > > > > Your settings are pretty aggressive with acceleration of 25 in/sec2.ÃÂ I calculate to move 0.1 inches will only take 0.12 seconds with infinite Jerk (what Mach3 always uses).ÃÂ So that explains why "rapids" with KMotionCNC is slower.ÃÂ With Jerk limit it takes about 0.27 seconds.ÃÂ I often just enter the numbers into the Step Response Screen to visually see the profile.
> > > > > ÃÂ
> > > > > But I don't understand why feed moves (infinite Jerk) would be different between Mach3 and KMotionCNC.ÃÂ I would capture and plot the data to see which is correct.
> > > > > ÃÂ
> > > > > Yes by all means wire the encoder back to KFLOP to be able to plot the servo performance.
> > > > > ÃÂ
> > > > > Regards
> > > > > TKÃÂ
> > > > >
> > > > > From: himykabibble <jagboy@>
> > > > > To: DynoMotion@yahoogroups.com
> > > > > Sent: Thursday, February 2, 2012 6:12 PM
> > > > > Subject: [DynoMotion] Can You Verify My Settings?
> > > > >
> > > > >
> > > > > ÃÂ
> > > > > Tom,
> > > > >
> > > > > I tried to actually use my machine with my new app today. The good news is the app did nothing unexpected, and I can tell I will really like the UI once it's a bit more polished. One of the things I added last night was I now output the tool table into my G-code, and the G-code loader in my app now finds it, and pushes it into the interpreter automatically. I will make a tool length database, and hook it into that, so the current tool length settings will be automatically updated each time the program is loaded.
> > > > >
> > > > > However, on the first part I tried to cut today, I found it losing position on the quill when doing peck drilling. This always occurred on the up-move. After digging into this a bit, I came up with a simple test program that does a short feed move down at F30, then a 200 IPM rapid back up to the start position. It just does this over, and over, and over. When I run this with my app, I get *constant* faults on the quill servo (something I've never seen in 3 years with this machine). When I run it under KMotionCNC, with what *should* be the same settings, I get occasional faults. When I run it under Mach3 (still with the KFlop), I get no faults.
> > > > >
> > > > > Why would I get a different result running my app vs KMotionCNC? Or even Mach3 for that matter? I believe the settings are exactly the same, as follows:
> > > > >
> > > > > X/Y Steps/Inch: 20000
> > > > > X/Y Vel: 200 IPM | 66667 counts/sec
> > > > > X/Y Accel: 25 in/sec^2 | 500000counts/sec^2
> > > > > X/Y Jerk: 2E6
> > > > >
> > > > > Z Steps/Inch: 20320
> > > > > Z Vel: 150 IPM/50800 counts/sec
> > > > > Z Accel: 25 in/sec^2 | 508000 counts/sec*2
> > > > > Z Jerk: 2E6
> > > > >
> > > > > A Steps/Inch: 96000
> > > > > A Vel: 50 IPM | 80000
> > > > > A Accel: 5 in/sec^2 | 480000
> > > > > A Jerk: 2E6
> > > > >
> > > > > Any ideas?
> > > > >
> > > > > One significant difference I noted between running with Mach3 and running with KMotion - I changed the program to be a 100IPM feed down to -0.1, then a rapid back up to 0.0. If I run this under Mach3, the quill moves up and down VERY quickly, probably making 2-3 cycles/second. Under KMotionCNC and my app, the time to complete each down and up cycle is probably 2-3X what it is in Mach3 - completing no more than one cycle per second.
> > > > >
> > > > > Regards,
> > > > > Ray L.
> > > > >
> > > >
> > >
> >
>
|
|
Group: DynoMotion |
Message: 3695 |
From: himykabibble |
Date: 2/3/2012 |
Subject: Re: Can You Verify My Settings? |
Tom,
Not sure what you mean by "Is that from your code?". What code are you suggesting I step into? I've posted my init code, which is about all that should matter here. Other than that, I'm passing the G-code file to the Interpreter. The axis settings I'm trying to set in my app are clearly not having any effect whatsoever on how the machine moves. It is clearly FAR exceeding the specified acceleration and velocity - this can be seen simply by watching it.
My axes are all connected to JP7, with spindle controls on JP6, and the pendant on the RJ45. Everything OTHER than G1s, is working perfectly, including the pendant.
Just for the sake of completeness, here is my Init.c:
main()
{
ch0->InputMode=NO_INPUT_MODE;
ch0->OutputMode=STEP_DIR_MODE;
ch0->Vel=66667;
ch0->Accel=500000;
ch0->Jerk=4e+006;
ch0->P=0;
ch0->I=0.01;
ch0->D=0;
ch0->FFAccel=0;
ch0->FFVel=0;
ch0->MaxI=200;
ch0->MaxErr=1e+006;
ch0->MaxOutput=200;
ch0->DeadBandGain=1;
ch0->DeadBandRange=0;
ch0->InputChan0=0;
ch0->InputChan1=0;
ch0->OutputChan0=8;
ch0->OutputChan1=0;
ch0->MasterAxis=-1;
ch0->LimitSwitchOptions=0x0;
ch0->InputGain0=1;
ch0->InputGain1=1;
ch0->InputOffset0=0;
ch0->InputOffset1=0;
ch0->OutputGain=1;
ch0->OutputOffset=0;
ch0->SlaveGain=1;
ch0->BacklashMode=BACKLASH_OFF;
ch0->BacklashAmount=0;
ch0->BacklashRate=0;
ch0->invDistPerCycle=1;
ch0->Lead=0;
ch0->MaxFollowingError=1000000000;
ch0->StepperAmplitude=20;
ch0->iir[0].B0=1;
ch0->iir[0].B1=0;
ch0->iir[0].B2=0;
ch0->iir[0].A1=0;
ch0->iir[0].A2=0;
ch0->iir[1].B0=1;
ch0->iir[1].B1=0;
ch0->iir[1].B2=0;
ch0->iir[1].A1=0;
ch0->iir[1].A2=0;
ch0->iir[2].B0=0.000769;
ch0->iir[2].B1=0.001538;
ch0->iir[2].B2=0.000769;
ch0->iir[2].A1=1.92081;
ch0->iir[2].A2=-0.923885;
EnableAxisDest(0,ch0->Dest);
ch1->InputMode=NO_INPUT_MODE;
ch1->OutputMode=STEP_DIR_MODE;
ch1->Vel=66667;
ch1->Accel=500000;
ch1->Jerk=4e+006;
ch1->P=0;
ch1->I=0.01;
ch1->D=0;
ch1->FFAccel=0;
ch1->FFVel=0;
ch1->MaxI=200;
ch1->MaxErr=1e+006;
ch1->MaxOutput=200;
ch1->DeadBandGain=1;
ch1->DeadBandRange=0;
ch1->InputChan0=1;
ch1->InputChan1=0;
ch1->OutputChan0=9;
ch1->OutputChan1=0;
ch1->MasterAxis=-1;
ch1->LimitSwitchOptions=0x0;
ch1->InputGain0=1;
ch1->InputGain1=1;
ch1->InputOffset0=0;
ch1->InputOffset1=0;
ch1->OutputGain=1;
ch1->OutputOffset=0;
ch1->SlaveGain=1;
ch1->BacklashMode=BACKLASH_OFF;
ch1->BacklashAmount=0;
ch1->BacklashRate=0;
ch1->invDistPerCycle=1;
ch1->Lead=0;
ch1->MaxFollowingError=1000000000;
ch1->StepperAmplitude=20;
ch1->iir[0].B0=1;
ch1->iir[0].B1=0;
ch1->iir[0].B2=0;
ch1->iir[0].A1=0;
ch1->iir[0].A2=0;
ch1->iir[1].B0=1;
ch1->iir[1].B1=0;
ch1->iir[1].B2=0;
ch1->iir[1].A1=0;
ch1->iir[1].A2=0;
ch1->iir[2].B0=0.000769;
ch1->iir[2].B1=0.001538;
ch1->iir[2].B2=0.000769;
ch1->iir[2].A1=1.92081;
ch1->iir[2].A2=-0.923885;
EnableAxisDest(1,ch1->Dest);
ch2->InputMode=NO_INPUT_MODE;
ch2->OutputMode=STEP_DIR_MODE;
ch2->Vel=67733;
ch2->Accel=508000;
ch2->Jerk=4e+006;
ch2->P=0;
ch2->I=0.01;
ch2->D=0;
ch2->FFAccel=0;
ch2->FFVel=0;
ch2->MaxI=200;
ch2->MaxErr=1e+006;
ch2->MaxOutput=200;
ch2->DeadBandGain=1;
ch2->DeadBandRange=0;
ch2->InputChan0=2;
ch2->InputChan1=0;
ch2->OutputChan0=10;
ch2->OutputChan1=0;
ch2->MasterAxis=-1;
ch2->LimitSwitchOptions=0x0;
ch2->InputGain0=1;
ch2->InputGain1=1;
ch2->InputOffset0=0;
ch2->InputOffset1=0;
ch2->OutputGain=1;
ch2->OutputOffset=0;
ch2->SlaveGain=1;
ch2->BacklashMode=BACKLASH_OFF;
ch2->BacklashAmount=0;
ch2->BacklashRate=0;
ch2->invDistPerCycle=1;
ch2->Lead=0;
ch2->MaxFollowingError=1000000000;
ch2->StepperAmplitude=20;
ch2->iir[0].B0=1;
ch2->iir[0].B1=0;
ch2->iir[0].B2=0;
ch2->iir[0].A1=0;
ch2->iir[0].A2=0;
ch2->iir[1].B0=1;
ch2->iir[1].B1=0;
ch2->iir[1].B2=0;
ch2->iir[1].A1=0;
ch2->iir[1].A2=0;
ch2->iir[2].B0=0.000769;
ch2->iir[2].B1=0.001538;
ch2->iir[2].B2=0.000769;
ch2->iir[2].A1=1.92081;
ch2->iir[2].A2=-0.923885;
EnableAxisDest(2,ch2->Dest);
ch3->InputMode=NO_INPUT_MODE;
ch3->OutputMode=STEP_DIR_MODE;
ch3->Vel=64000;
ch3->Accel=480000;
ch3->Jerk=4e+006;
ch3->P=1;
ch3->I=0;
ch3->D=0;
ch3->FFAccel=0;
ch3->FFVel=0;
ch3->MaxI=200;
ch3->MaxErr=1e+006;
ch3->MaxOutput=200;
ch3->DeadBandGain=1;
ch3->DeadBandRange=0;
ch3->InputChan0=3;
ch3->InputChan1=0;
ch3->OutputChan0=11;
ch3->OutputChan1=0;
ch3->MasterAxis=-1;
ch3->LimitSwitchOptions=0x0;
ch3->InputGain0=1;
ch3->InputGain1=1;
ch3->InputOffset0=0;
ch3->InputOffset1=0;
ch3->OutputGain=1;
ch3->OutputOffset=0;
ch3->SlaveGain=1;
ch3->BacklashMode=BACKLASH_OFF;
ch3->BacklashAmount=0;
ch3->BacklashRate=0;
ch3->invDistPerCycle=1;
ch3->Lead=0;
ch3->MaxFollowingError=1000000000;
ch3->StepperAmplitude=20;
ch3->iir[0].B0=1;
ch3->iir[0].B1=0;
ch3->iir[0].B2=0;
ch3->iir[0].A1=0;
ch3->iir[0].A2=0;
ch3->iir[1].B0=1;
ch3->iir[1].B1=0;
ch3->iir[1].B2=0;
ch3->iir[1].A1=0;
ch3->iir[1].A2=0;
ch3->iir[2].B0=1;
ch3->iir[2].B1=0;
ch3->iir[2].B2=0;
ch3->iir[2].A1=0;
ch3->iir[2].A2=0;
EnableAxisDest(3,ch3->Dest);
DefineCoordSystem(0,1,2,3);
}
Regards,
Ray L.
--- In DynoMotion@yahoogroups.com, Tom Kerekes <tk@...> wrote:
>
> Hi Ray,
> Â
> Sounds like a bug. Is that from your code? Maybe some parameter is not being set? You will probably have to step into the code to figure it out. Otherwise capture the output motion to see what the really acceleration is.
> Â
> Which connectors are you using. You can multiplex the encoder inputs to JP4 and JP6 if that helps.
> Â
> Regards
> TK
>
>
> ________________________________
> From: himykabibble <jagboy@...>
> To: DynoMotion@yahoogroups.com
> Sent: Friday, February 3, 2012 9:14 AM
> Subject: [DynoMotion] Re: Can You Verify My Settings?
>
>
> Â
> Just a little more data:
>
> I increased velocity to 200 IPM (67733), acceleration to 35 in/sec^2 (700000), and jerk to 2E12, and I get VERY rare faults when running G0s - perhaps one every few hundred cycles. This is perfectly consistent with what I saw when I first setup the system with Mach3. With the 5X reduced settings in my previous post, I still get CONSTANT faults running G1s, even with the Feedrate specified as only 15 IPM. Why is the response to G1s so radically different from G0s?
>
> Unfortunately, no easy way to wire encoders in, as I'm using the encoder pins for other things, and I'm not keen on re-wiring just now. But, it seems to me the fact that I can run such aggressive parameters with G0s indicates the servo tuning is not all that far from optimal.
>
> Regards,
> Ray L.
>
> --- In DynoMotion@yahoogroups.com, "himykabibble" <jagboy@> wrote:
> >
> > Tom,
> >
> > I'm stumped here.... If I do:
> >
> > G00 Z-0.5
> > G00 Z0.0
> >
> > with acceleration at 25in/sec^2, jerk at 20E6, it will run HUNDREDS of cycles, never skipping a beat. I have . But, if I do:
> >
> > G01 Z-0.5 F150
> > G01 Z0.0
> >
> > even with acceleration reduced by a factor of 5 (to 5in/sec^2), and jerk reduced to 2E5, it faults the servo on EVERY move, and the axis never moves! What is going on here?
> >
> > This is the same behavior I've been seeing on my knee - where G0s work perfectly, but when I try to jog with the pendant, I can very easily get faults, even at very low speeds. None of the axes on this machine have ever faulted in the past, unless I ran them into an immovable object.
> >
> > Regards,
> > Ray L.
> >
> > --- In DynoMotion@yahoogroups.com, "himykabibble" <jagboy@> wrote:
> > >
> > > Tom,
> > >
> > > The code is the following two lines repeated many time:
> > >
> > > G01 Z-0.1 F30
> > > G00 Z0.0
> > >
> > > The velocity and acceleration settings are what I've been using ever since I built the machine over 3 years ago. Never a problem. In fact, it's capable of more, it's just too scary to crank things up any higher.
> > >
> > > Can you explain why KMotionCNC would behave differently from my app? That's the one that really makes no sense to me. I can accept that the servo tuning is not perfect (though it's worked perfectly all these years), but I can't understand why KMotionCNC would not exactly duplicate what my app does, unless the settings in my program are wrong.
> > >
> > > Regards,
> > > Ray L.
> > >
> > > --- In DynoMotion@yahoogroups.com, Tom Kerekes <tk@> wrote:
> > > >
> > > > Hi Ray,
> > > > ÃÂ
> > > > When you say "200ÃÂ IPM rapid back up" I assume youÃÂ didn't mean to say "rapid" as in G0?ÃÂ It would help to just list the G code.
> > > > ÃÂ
> > > > All we are using here is the Z axis correct?
> > > > ÃÂ
> > > > Your settings are pretty aggressive with acceleration of 25 in/sec2.ÃÂ I calculate to move 0.1 inches will only take 0.12 seconds with infinite Jerk (what Mach3 always uses).ÃÂ So that explains why "rapids" with KMotionCNC is slower.ÃÂ With Jerk limit it takes about 0.27 seconds.ÃÂ I often just enter the numbers into the Step Response Screen to visually see the profile.
> > > > ÃÂ
> > > > But I don't understand why feed moves (infinite Jerk) would be different between Mach3 and KMotionCNC.ÃÂ I would capture and plot the data to see which is correct.
> > > > ÃÂ
> > > > Yes by all means wire the encoder back to KFLOP to be able to plot the servo performance.
> > > > ÃÂ
> > > > Regards
> > > > TKÃÂ
> > > >
> > > > From: himykabibble <jagboy@>
> > > > To: DynoMotion@yahoogroups.com
> > > > Sent: Thursday, February 2, 2012 6:12 PM
> > > > Subject: [DynoMotion] Can You Verify My Settings?
> > > >
> > > >
> > > > ÃÂ
> > > > Tom,
> > > >
> > > > I tried to actually use my machine with my new app today. The good news is the app did nothing unexpected, and I can tell I will really like the UI once it's a bit more polished. One of the things I added last night was I now output the tool table into my G-code, and the G-code loader in my app now finds it, and pushes it into the interpreter automatically. I will make a tool length database, and hook it into that, so the current tool length settings will be automatically updated each time the program is loaded.
> > > >
> > > > However, on the first part I tried to cut today, I found it losing position on the quill when doing peck drilling. This always occurred on the up-move. After digging into this a bit, I came up with a simple test program that does a short feed move down at F30, then a 200 IPM rapid back up to the start position. It just does this over, and over, and over. When I run this with my app, I get *constant* faults on the quill servo (something I've never seen in 3 years with this machine). When I run it under KMotionCNC, with what *should* be the same settings, I get occasional faults. When I run it under Mach3 (still with the KFlop), I get no faults.
> > > >
> > > > Why would I get a different result running my app vs KMotionCNC? Or even Mach3 for that matter? I believe the settings are exactly the same, as follows:
> > > >
> > > > X/Y Steps/Inch: 20000
> > > > X/Y Vel: 200 IPM | 66667 counts/sec
> > > > X/Y Accel: 25 in/sec^2 | 500000counts/sec^2
> > > > X/Y Jerk: 2E6
> > > >
> > > > Z Steps/Inch: 20320
> > > > Z Vel: 150 IPM/50800 counts/sec
> > > > Z Accel: 25 in/sec^2 | 508000 counts/sec*2
> > > > Z Jerk: 2E6
> > > >
> > > > A Steps/Inch: 96000
> > > > A Vel: 50 IPM | 80000
> > > > A Accel: 5 in/sec^2 | 480000
> > > > A Jerk: 2E6
> > > >
> > > > Any ideas?
> > > >
> > > > One significant difference I noted between running with Mach3 and running with KMotion - I changed the program to be a 100IPM feed down to -0.1, then a rapid back up to 0.0. If I run this under Mach3, the quill moves up and down VERY quickly, probably making 2-3 cycles/second. Under KMotionCNC and my app, the time to complete each down and up cycle is probably 2-3X what it is in Mach3 - completing no more than one cycle per second.
> > > >
> > > > Regards,
> > > > Ray L.
> > > >
> > >
> >
>
|
|
Group: DynoMotion |
Message: 3696 |
From: Tom Kerekes |
Date: 2/3/2012 |
Subject: Re: Can You Verify My Settings? |
Hi Ray,
I don't see anything wrong. Again the simplest thing would just be to use the debugger to check what Aceleration is actually being used in the Trajectory Planner. If it is wrong, work backwards to find the disconnect. That's the nice thing about having all the source code.
I agree it most likely an issue with the .NET. If you want to post your code I can try to find time to debug it. But I would need everything including the .NET interface you are currently using.
One other possibility might be the feed rate override being set to infinity or something.
Regards
TK
Group: DynoMotion |
Message: 3698 |
From: brad murry |
Date: 2/3/2012 |
Subject: Re: Can You Verify My Settings? |
You can check values once you set them, the .net properties do not actually retain data, they merely get and set public members in the c++ code. This means if you set a value and then check it you
are reading the values in the underlying libraries. As an added test you can verify values with script commands.
I have played with accels and velocities and it seems to work for me.
-Brad Murry
From:
Tom Kerekes
Sent:
2/3/2012 12:11 PM
To:
DynoMotion@yahoogroups.com
Subject:
Re: [DynoMotion] Re: Can You Verify My Settings?
Hi Ray,
I don't see anything wrong. Again the simplest thing would just be to use the debugger to check what Aceleration is actually being used in the Trajectory Planner. If it is wrong, work backwards to find the disconnect. That's the nice thing about
having all the source code.
I agree it most likely an issue with the .NET. If you want to post your code I can try to find time to debug it. But I would need everything including the .NET interface you are currently using.
One other possibility might be the feed rate override being set to infinity or something.
Regards
TK
From: himykabibble <jagboy@...>
To: DynoMotion@yahoogroups.com
Sent: Friday, February 3, 2012 10:25 AM
Subject: [DynoMotion] Re: Can You Verify My Settings?
Tom,
I just tried KMotionCNC again, and it is NOT having this problem, which suggests to me I'm either not doing some essential initialization, or there's a bug in dotNet, and it;s not doing the requested initialization correctly. Both my app and KMotionCNC are
using the exact same Init.c, so my init code and dotNet appear to me to be the only variables, as the only other thing my app is doing is passing the G-code file to the interpreter.
Am I doing the right init? Am I doing it at the right time???
Kinda smells like the axis parameters are not "taking", since changing acceleration and velocity all over the map makes NO difference in the behavior.
Below is ALL of the init I'm doing in my app, other than loading the Init.c. This is all done when the first connection is established on app startup. If the connection is lost, only Init.c is re-loaded when the connection comes back.
private void InitAxes()
{
// Define the axes
KMAxes = new Dictionary<string, KMotion_dotNet.KM_Axis>();
KMAxes.Add("XAxis", new KMotion_dotNet.KM_Axis(KMController, 0, "XAxis"));
KMAxes.Add("YAxis", new KMotion_dotNet.KM_Axis(KMController, 1, "YAxis"));
KMAxes.Add("ZAxis", new KMotion_dotNet.KM_Axis(KMController, 2, "ZAxis"));
KMAxes.Add("AAxis", new KMotion_dotNet.KM_Axis(KMController, 3, "AAxis"));
KMController.AxisChannels = KMAxes;
KMController.CoordMotion.Abort();
KMController.CoordMotion.ClearAbort();
KMController.CoordMotion.MotionParams.CountsPerInchX = StepsPerInchX;
KMController.CoordMotion.MotionParams.MaxVelX = MaxVelX;
KMController.CoordMotion.MotionParams.MaxAccelX = AccelX;
KMController.WriteLine("EnableAxis0");
KMController.CoordMotion.MotionParams.CountsPerInchY = StepsPerInchY;
KMController.CoordMotion.MotionParams.MaxVelY = MaxVelY;
KMController.CoordMotion.MotionParams.MaxAccelY = AccelY;
KMController.WriteLine("EnableAxis1");
KMController.CoordMotion.MotionParams.CountsPerInchZ = StepsPerInchZ;
KMController.CoordMotion.MotionParams.MaxVelZ = MaxVelZ;
KMController.CoordMotion.MotionParams.MaxAccelZ = AccelZ;
KMController.WriteLine("EnableAxis2");
KMController.CoordMotion.MotionParams.CountsPerInchA = StepsPerInchA;
KMController.CoordMotion.MotionParams.MaxVelA = MaxVelA;
KMController.CoordMotion.MotionParams.MaxAccelA = AccelA;
KMController.WriteLine("EnableAxis3");
KMController.WriteLine("DefineCS = 0 1 2 3 -1 -1");
}
public void InterpreterInit()
{
KMController.Interpreter.Interpreter_CoordMotionStraightFeed +=
new KM_CoordMotionStraightFeedHandler(Interpreter_Interpreter_CoordMotionStraightFeed);
KMController.Interpreter.Interpreter_CoordMotionStraightTraverse +=
new KM_CoordMotionStraightTraverseHandler(Interpreter_Interpreter_CoordMotionStraightTraverse);
KMController.Interpreter.Interpreter_CoordMotionArcFeed +=
new KM_CoordMotionArcFeedHandler(Interpreter_Interpreter_CoordMotionArcFeed);
KMController.Interpreter.InterpreterCompleted +=
new KM_Controller.KM_Interpreter.KM_GCodeInterpreterCompleteHandler(Interpreter_InterpreterCompleted);
KMController.Interpreter.InterpreterStatusUpdated +=
new KM_Controller.KM_Interpreter.KM_GCodeInterpreterStatusHandler(Interpreter_InterpreterStatusUpdated);
KMController.Interpreter.MainPathRoot = @"C:\KMotion428";
KMController.Interpreter.CountsPerInchX = StepsPerInchX;
KMController.Interpreter.MaxVelX = MaxVelX;
KMController.Interpreter.MaxAccelX = AccelX;
KMController.Interpreter.CountsPerInchY = StepsPerInchY;
KMController.Interpreter.MaxVelY = MaxVelY;
KMController.Interpreter.MaxAccelY = AccelY;
KMController.Interpreter.CountsPerInchZ = StepsPerInchZ;
KMController.Interpreter.MaxVelZ = MaxVelZ;
KMController.Interpreter.MaxAccelZ = AccelZ;
KMController.Interpreter.CountsPerInchA = StepsPerInchA;
KMController.Interpreter.MaxVelA = MaxVelA;
KMController.Interpreter.MaxAccelA = AccelA;
KMController.Interpreter.BreakAngle = 30;
KMController.Interpreter.SetupParams.LengthUnits = KMotion_dotNet.CANON_UNITS.CANON_UNITS_INCHES;
KMController.Interpreter.SetupParams.X_AxisOffset = 0.0;
KMController.Interpreter.SetupParams.Y_AxisOffset = 0.0;
KMController.Interpreter.SetupParams.Z_AxisOffset = 0.0;
KMController.Interpreter.SetupParams.BlockDelete = true;
KMController.Interpreter.SetupParams.RadiusCompSide = KMotion_dotNet.CANON_SIDE.CANON_SIDE_OFF;
KMController.Interpreter.SetupParams.Cycle_R = 0.0;
KMController.Interpreter.SetupParams.Cycle_Z = 0.0;
KMController.Interpreter.SetupParams.DistanceMode = KMotion_dotNet.DISTANCE_MODE.MODE_ABSOLUTE;
KMController.Interpreter.SetupParams.FeedMode = 2;
KMController.Interpreter.SetupParams.FloodCoolantOn = false;
KMController.Interpreter.SetupParams.MistCoolantOn = false;
KMController.Interpreter.SetupParams.CurrentMotionMode = 80;
KMController.Interpreter.SetupParams.WorkPlane = KMotion_dotNet.CANON_PLANE.CANON_PLANE_XY;
KMController.Interpreter.SetupParams.ToolLengthOffsetIndex = 1;
KMController.Interpreter.SetupParams.RadiusComp = 1;
KMController.Interpreter.SetupParams.SelectedToolSlot = 1;
KMController.Interpreter.SetupParams.TraverseSpeed = 200;
KMController.Interpreter.SetupParams.SpindleDirection = KMotion_dotNet.CANON_DIRECTION.CANON_STOPPED;
KMController.Interpreter.SetupParams.ToolLengthOffset = 0.0;
KMController.Interpreter.SetMcodeAction(3, MCODE_TYPE.M_Action_SetTwoBits, 27, 1, 28, 0, 0, "SpindleCW");
KMController.Interpreter.SetMcodeAction(4, MCODE_TYPE.M_Action_SetTwoBits, 27, 0, 28, 1, 0, "SpindleCCW");
KMController.Interpreter.SetMcodeAction(5, MCODE_TYPE.M_Action_SetTwoBits, 27, 0, 28, 0, 0, "SpindleOff");
KMController.Interpreter.SetMcodeAction(7, MCODE_TYPE.M_Action_Setbit, 3, 1, 0, 0, 0, "MistOn");
KMController.Interpreter.SetMcodeAction(8, MCODE_TYPE.M_Action_Setbit, 4, 1, 0, 0, 0, "FloodOn");
KMController.Interpreter.SetMcodeAction(9, MCODE_TYPE.M_Action_SetTwoBits, 3, 0, 4, 0, 0, "CoolantOff");
KMController.Interpreter.SetMcodeAction(10, MCODE_TYPE.M_Action_Program, 2, 4, 0, 0, 0, @"C:\My KFlop C Programs\KMotionCNC\KMotionCNCSpindlePWM.c");
KMController.Interpreter.SetMcodeAction(21, MCODE_TYPE.M_Action_Program, 4, 10, 28, 0, 0, @"C:\My KFlop C Programs\KMotionCNC\KMotionCNCMCodeHandler.c");
KMController.Interpreter.InitializeOnExecute = false;
KMController.Interpreter.InitializeInterpreter();
InterpreterInitialized = true;
RunCommand(@"C:\KMotion428\GCode Programs\Init.nc", "G20 F0 S0 G54", true);
while (InterpreterIsRunning)
;
}
Regards,
Ray L.
--- In
DynoMotion@yahoogroups.com, Tom Kerekes <tk@...> wrote:
>
> Hi Ray,
> Â
> Sounds like a bug. Is that from your code? Maybe some parameter is not being set? You will probably have to step into the code to figure it out. Otherwise capture the output motion to see what the really acceleration is.
> Â
> Which connectors are you using. You can multiplex the encoder inputs to JP4 and JP6 if that helps.
> Â
> Regards
> TK
>
>
> ________________________________
> From: himykabibble <jagboy@...>
> To:
DynoMotion@yahoogroups.com
> Sent: Friday, February 3, 2012 9:14 AM
> Subject: [DynoMotion] Re: Can You Verify My Settings?
>
>
> Â
> Just a little more data:
>
> I increased velocity to 200 IPM (67733), acceleration to 35 in/sec^2 (700000), and jerk to 2E12, and I get VERY rare faults when running G0s - perhaps one every few hundred cycles. This is perfectly consistent with what I saw when I first setup the system
with Mach3. With the 5X reduced settings in my previous post, I still get CONSTANT faults running G1s, even with the Feedrate specified as only 15 IPM. Why is the response to G1s so radically different from G0s?
>
> Unfortunately, no easy way to wire encoders in, as I'm using the encoder pins for other things, and I'm not keen on re-wiring just now. But, it seems to me the fact that I can run such aggressive parameters with G0s indicates the servo tuning is not all that
far from optimal.
>
> Regards,
> Ray L.
>
> --- In
DynoMotion@yahoogroups.com, "himykabibble" <jagboy@> wrote:
> >
> > Tom,
> >
> > I'm stumped here.... If I do:
> >
> > G00 Z-0.5
> > G00 Z0.0
> >
> > with acceleration at 25in/sec^2, jerk at 20E6, it will run HUNDREDS of cycles, never skipping a beat. I have . But, if I do:
> >
> > G01 Z-0.5 F150
> > G01 Z0.0
> >
> > even with acceleration reduced by a factor of 5 (to 5in/sec^2), and jerk reduced to 2E5, it faults the servo on EVERY move, and the axis never moves! What is going on here?
> >
> > This is the same behavior I've been seeing on my knee - where G0s work perfectly, but when I try to jog with the pendant, I can very easily get faults, even at very low speeds. None of the axes on this machine have ever faulted in the past, unless I ran
them into an immovable object.
> >
> > Regards,
> > Ray L.
> >
> > --- In
DynoMotion@yahoogroups.com, "himykabibble" <jagboy@> wrote:
> > >
> > > Tom,
> > >
> > > The code is the following two lines repeated many time:
> > >
> > > G01 Z-0.1 F30
> > > G00 Z0.0
> > >
> > > The velocity and acceleration settings are what I've been using ever since I built the machine over 3 years ago. Never a problem. In fact, it's capable of more, it's just too scary to crank things up any higher.
> > >
> > > Can you explain why KMotionCNC would behave differently from my app? That's the one that really makes no sense to me. I can accept that the servo tuning is not perfect (though it's worked perfectly all these years), but I can't understand why KMotionCNC
would not exactly duplicate what my app does, unless the settings in my program are wrong.
> > >
> > > Regards,
> > > Ray L.
> > >
> > > --- In
DynoMotion@yahoogroups.com, Tom Kerekes <tk@> wrote:
> > > >
> > > > Hi Ray,
> > > > ÂÂ
> > > > When you say "200 IPM rapid back up" I assume you didn't mean to say "rapid" as in G0? It would help to just list the G code.
> > > > ÂÂ
> > > > All we are using here is the Z axis correct?
> > > > ÂÂ
> > > > Your settings are pretty aggressive with acceleration of 25 in/sec2. I calculate to move 0.1 inches will only take 0.12 seconds with infinite Jerk (what Mach3 always uses). So that explains why "rapids" with KMotionCNC is slower. With Jerk
limit it takes about 0.27 seconds. I often just enter the numbers into the Step Response Screen to visually see the profile.
> > > > ÂÂ
> > > > But I don't understand why feed moves (infinite Jerk) would be different between Mach3 and KMotionCNC. I would capture and plot the data to see which is correct.
> > > > ÂÂ
> > > > Yes by all means wire the encoder back to KFLOP to be able to plot the servo performance.
> > > > ÂÂ
> > > > Regards
> > > > TKÂÂ
> > > >
> > > > From: himykabibble <jagboy@>
> > > > To:
DynoMotion@yahoogroups.com
> > > > Sent: Thursday, February 2, 2012 6:12 PM
> > > > Subject: [DynoMotion] Can You Verify My Settings?
> > > >
> > > >
> > > > ÂÂ
> > > > Tom,
> > > >
> > > > I tried to actually use my machine with my new app today. The good news is the app did nothing unexpected, and I can tell I will really like the UI once it's a bit more polished. One of the things I added last night was I now output the tool table into
my G-code, and the G-code loader in my app now finds it, and pushes it into the interpreter automatically. I will make a tool length database, and hook it into that, so the current tool length settings will be automatically updated each time the program is
loaded.
> > > >
> > > > However, on the first part I tried to cut today, I found it losing position on the quill when doing peck drilling. This always occurred on the up-move. After digging into this a bit, I came up with a simple test program that does a short feed move down
at F30, then a 200 IPM rapid back up to the start position. It just does this over, and over, and over. When I run this with my app, I get *constant* faults on the quill servo (something I've never seen in 3 years with this machine). When I run it under KMotionCNC,
with what *should* be the same settings, I get occasional faults. When I run it under Mach3 (still with the KFlop), I get no faults.
> > > >
> > > > Why would I get a different result running my app vs KMotionCNC? Or even Mach3 for that matter? I believe the settings are exactly the same, as follows:
> > > >
> > > > X/Y Steps/Inch: 20000
> > > > X/Y Vel: 200 IPM | 66667 counts/sec
> > > > X/Y Accel: 25 in/sec^2 | 500000counts/sec^2
> > > > X/Y Jerk: 2E6
> > > >
> > > > Z Steps/Inch: 20320
> > > > Z Vel: 150 IPM/50800 counts/sec
> > > > Z Accel: 25 in/sec^2 | 508000 counts/sec*2
> > > > Z Jerk: 2E6
> > > >
> > > > A Steps/Inch: 96000
> > > > A Vel: 50 IPM | 80000
> > > > A Accel: 5 in/sec^2 | 480000
> > > > A Jerk: 2E6
> > > >
> > > > Any ideas?
> > > >
> > > > One significant difference I noted between running with Mach3 and running with KMotion - I changed the program to be a 100IPM feed down to -0.1, then a rapid back up to 0.0. If I run this under Mach3, the quill moves up and down VERY quickly, probably
making 2-3 cycles/second. Under KMotionCNC and my app, the time to complete each down and up cycle is probably 2-3X what it is in Mach3 - completing no more than one cycle per second.
> > > >
> > > > Regards,
> > > > Ray L.
> > > >
> > >
> >
>
|
|
Group: DynoMotion |
Message: 3699 |
From: himykabibble |
Date: 2/3/2012 |
Subject: Re: Can You Verify My Settings? |
Brad,
I've just read back the Interpreter and CoordMotion parameters for all six axes,and they all read back what they should. Where else could this possibly be coming from?
I've had no luck getting VS2010 Express to let me debug into the DLLs.
Regards,
Ray L.
--- In DynoMotion@yahoogroups.com, brad murry <bradodarb@...> wrote:
>
> You can check values once you set them, the .net properties do not actually retain data, they merely get and set public members in the c++ code. This means if you set a value and then check it you are reading the values in the underlying libraries. As an added test you can verify values with script commands.
>
> I have played with accels and velocities and it seems to work for me.
>
> -Brad Murry
> ________________________________
> From: Tom Kerekes
> Sent: 2/3/2012 12:11 PM
> To: DynoMotion@yahoogroups.com
> Subject: Re: [DynoMotion] Re: Can You Verify My Settings?
>
> Hi Ray,
>
> I don't see anything wrong. Again the simplest thing would just be to use the debugger to check what Aceleration is actually being used in the Trajectory Planner. If it is wrong, work backwards to find the disconnect. That's the nice thing about having all the source code.
>
> I agree it most likely an issue with the .NET. If you want to post your code I can try to find time to debug it. But I would need everything including the .NET interface you are currently using.
>
> One other possibility might be the feed rate override being set to infinity or something.
>
> Regards
> TK
>
>
>
>
>
> From: himykabibble <jagboy@...>
> To: DynoMotion@yahoogroups.com
> Sent: Friday, February 3, 2012 10:25 AM
> Subject: [DynoMotion] Re: Can You Verify My Settings?
>
>
>
> Tom,
>
> I just tried KMotionCNC again, and it is NOT having this problem, which suggests to me I'm either not doing some essential initialization, or there's a bug in dotNet, and it;s not doing the requested initialization correctly. Both my app and KMotionCNC are using the exact same Init.c, so my init code and dotNet appear to me to be the only variables, as the only other thing my app is doing is passing the G-code file to the interpreter.
>
> Am I doing the right init? Am I doing it at the right time???
>
> Kinda smells like the axis parameters are not "taking", since changing acceleration and velocity all over the map makes NO difference in the behavior.
>
> Below is ALL of the init I'm doing in my app, other than loading the Init.c. This is all done when the first connection is established on app startup. If the connection is lost, only Init.c is re-loaded when the connection comes back.
>
> private void InitAxes()
> {
> // Define the axes
> KMAxes = new Dictionary<string, KMotion_dotNet.KM_Axis>();
> KMAxes.Add("XAxis", new KMotion_dotNet.KM_Axis(KMController, 0, "XAxis"));
> KMAxes.Add("YAxis", new KMotion_dotNet.KM_Axis(KMController, 1, "YAxis"));
> KMAxes.Add("ZAxis", new KMotion_dotNet.KM_Axis(KMController, 2, "ZAxis"));
> KMAxes.Add("AAxis", new KMotion_dotNet.KM_Axis(KMController, 3, "AAxis"));
>
> KMController.AxisChannels = KMAxes;
>
> KMController.CoordMotion.Abort();
> KMController.CoordMotion.ClearAbort();
>
> KMController.CoordMotion.MotionParams.CountsPerInchX = StepsPerInchX;
> KMController.CoordMotion.MotionParams.MaxVelX = MaxVelX;
> KMController.CoordMotion.MotionParams.MaxAccelX = AccelX;
> KMController.WriteLine("EnableAxis0");
>
> KMController.CoordMotion.MotionParams.CountsPerInchY = StepsPerInchY;
> KMController.CoordMotion.MotionParams.MaxVelY = MaxVelY;
> KMController.CoordMotion.MotionParams.MaxAccelY = AccelY;
> KMController.WriteLine("EnableAxis1");
>
> KMController.CoordMotion.MotionParams.CountsPerInchZ = StepsPerInchZ;
> KMController.CoordMotion.MotionParams.MaxVelZ = MaxVelZ;
> KMController.CoordMotion.MotionParams.MaxAccelZ = AccelZ;
> KMController.WriteLine("EnableAxis2");
>
> KMController.CoordMotion.MotionParams.CountsPerInchA = StepsPerInchA;
> KMController.CoordMotion.MotionParams.MaxVelA = MaxVelA;
> KMController.CoordMotion.MotionParams.MaxAccelA = AccelA;
> KMController.WriteLine("EnableAxis3");
>
> KMController.WriteLine("DefineCS = 0 1 2 3 -1 -1");
> }
>
> public void InterpreterInit()
> {
> KMController.Interpreter.Interpreter_CoordMotionStraightFeed +=
> new KM_CoordMotionStraightFeedHandler(Interpreter_Interpreter_CoordMotionStraightFeed);
> KMController.Interpreter.Interpreter_CoordMotionStraightTraverse +=
> new KM_CoordMotionStraightTraverseHandler(Interpreter_Interpreter_CoordMotionStraightTraverse);
> KMController.Interpreter.Interpreter_CoordMotionArcFeed +=
> new KM_CoordMotionArcFeedHandler(Interpreter_Interpreter_CoordMotionArcFeed);
> KMController.Interpreter.InterpreterCompleted +=
> new KM_Controller.KM_Interpreter.KM_GCodeInterpreterCompleteHandler(Interpreter_InterpreterCompleted);
> KMController.Interpreter.InterpreterStatusUpdated +=
> new KM_Controller.KM_Interpreter.KM_GCodeInterpreterStatusHandler(Interpreter_InterpreterStatusUpdated);
>
> KMController.Interpreter.MainPathRoot = @"C:\KMotion428";
>
> KMController.Interpreter.CountsPerInchX = StepsPerInchX;
> KMController.Interpreter.MaxVelX = MaxVelX;
> KMController.Interpreter.MaxAccelX = AccelX;
>
> KMController.Interpreter.CountsPerInchY = StepsPerInchY;
> KMController.Interpreter.MaxVelY = MaxVelY;
> KMController.Interpreter.MaxAccelY = AccelY;
>
> KMController.Interpreter.CountsPerInchZ = StepsPerInchZ;
> KMController.Interpreter.MaxVelZ = MaxVelZ;
> KMController.Interpreter.MaxAccelZ = AccelZ;
>
> KMController.Interpreter.CountsPerInchA = StepsPerInchA;
> KMController.Interpreter.MaxVelA = MaxVelA;
> KMController.Interpreter.MaxAccelA = AccelA;
>
> KMController.Interpreter.BreakAngle = 30;
>
> KMController.Interpreter.SetupParams.LengthUnits = KMotion_dotNet.CANON_UNITS.CANON_UNITS_INCHES;
> KMController.Interpreter.SetupParams.X_AxisOffset = 0.0;
> KMController.Interpreter.SetupParams.Y_AxisOffset = 0.0;
> KMController.Interpreter.SetupParams.Z_AxisOffset = 0.0;
>
> KMController.Interpreter.SetupParams.BlockDelete = true;
>
> KMController.Interpreter.SetupParams.RadiusCompSide = KMotion_dotNet.CANON_SIDE.CANON_SIDE_OFF;
> KMController.Interpreter.SetupParams.Cycle_R = 0.0;
> KMController.Interpreter.SetupParams.Cycle_Z = 0.0;
>
> KMController.Interpreter.SetupParams.DistanceMode = KMotion_dotNet.DISTANCE_MODE.MODE_ABSOLUTE;
>
> KMController.Interpreter.SetupParams.FeedMode = 2;
>
> KMController.Interpreter.SetupParams.FloodCoolantOn = false;
> KMController.Interpreter.SetupParams.MistCoolantOn = false;
>
> KMController.Interpreter.SetupParams.CurrentMotionMode = 80;
>
> KMController.Interpreter.SetupParams.WorkPlane = KMotion_dotNet.CANON_PLANE.CANON_PLANE_XY;
>
> KMController.Interpreter.SetupParams.ToolLengthOffsetIndex = 1;
> KMController.Interpreter.SetupParams.RadiusComp = 1;
>
> KMController.Interpreter.SetupParams.SelectedToolSlot = 1;
> KMController.Interpreter.SetupParams.TraverseSpeed = 200;
> KMController.Interpreter.SetupParams.SpindleDirection = KMotion_dotNet.CANON_DIRECTION.CANON_STOPPED;
> KMController.Interpreter.SetupParams.ToolLengthOffset = 0.0;
>
> KMController.Interpreter.SetMcodeAction(3, MCODE_TYPE.M_Action_SetTwoBits, 27, 1, 28, 0, 0, "SpindleCW");
> KMController.Interpreter.SetMcodeAction(4, MCODE_TYPE.M_Action_SetTwoBits, 27, 0, 28, 1, 0, "SpindleCCW");
> KMController.Interpreter.SetMcodeAction(5, MCODE_TYPE.M_Action_SetTwoBits, 27, 0, 28, 0, 0, "SpindleOff");
> KMController.Interpreter.SetMcodeAction(7, MCODE_TYPE.M_Action_Setbit, 3, 1, 0, 0, 0, "MistOn");
> KMController.Interpreter.SetMcodeAction(8, MCODE_TYPE.M_Action_Setbit, 4, 1, 0, 0, 0, "FloodOn");
> KMController.Interpreter.SetMcodeAction(9, MCODE_TYPE.M_Action_SetTwoBits, 3, 0, 4, 0, 0, "CoolantOff");
> KMController.Interpreter.SetMcodeAction(10, MCODE_TYPE.M_Action_Program, 2, 4, 0, 0, 0, @"C:\My KFlop C Programs\KMotionCNC\KMotionCNCSpindlePWM.c");
> KMController.Interpreter.SetMcodeAction(21, MCODE_TYPE.M_Action_Program, 4, 10, 28, 0, 0, @"C:\My KFlop C Programs\KMotionCNC\KMotionCNCMCodeHandler.c");
>
> KMController.Interpreter.InitializeOnExecute = false;
> KMController.Interpreter.InitializeInterpreter();
>
> InterpreterInitialized = true;
>
> RunCommand(@"C:\KMotion428\GCode Programs\Init.nc", "G20 F0 S0 G54", true);
>
> while (InterpreterIsRunning)
> ;
> }
>
> Regards,
> Ray L.
>
> --- In DynoMotion@yahoogroups.com, Tom Kerekes <tk@> wrote:
> >
> > Hi Ray,
> > Ã
> > Sounds like a bug.Ã Is that from your code?Ã Maybe some parameter is not being set?Ã You will probably have to step into the code to figure it out.Ã Otherwise capture the output motion to see what the really acceleration is.
> > Ã
> > Which connectors are you using.Ã You can multiplex the encoder inputs to JP4 and JP6 if that helps.
> > Ã
> > Regards
> > TK
> >
> >
> > ________________________________
> > From: himykabibble <jagboy@>
> > To: DynoMotion@yahoogroups.com
> > Sent: Friday, February 3, 2012 9:14 AM
> > Subject: [DynoMotion] Re: Can You Verify My Settings?
> >
> >
> > Ã
> > Just a little more data:
> >
> > I increased velocity to 200 IPM (67733), acceleration to 35 in/sec^2 (700000), and jerk to 2E12, and I get VERY rare faults when running G0s - perhaps one every few hundred cycles. This is perfectly consistent with what I saw when I first setup the system with Mach3. With the 5X reduced settings in my previous post, I still get CONSTANT faults running G1s, even with the Feedrate specified as only 15 IPM. Why is the response to G1s so radically different from G0s?
> >
> > Unfortunately, no easy way to wire encoders in, as I'm using the encoder pins for other things, and I'm not keen on re-wiring just now. But, it seems to me the fact that I can run such aggressive parameters with G0s indicates the servo tuning is not all that far from optimal.
> >
> > Regards,
> > Ray L.
> >
> > --- In DynoMotion@yahoogroups.com, "himykabibble" <jagboy@> wrote:
> > >
> > > Tom,
> > >
> > > I'm stumped here.... If I do:
> > >
> > > G00 Z-0.5
> > > G00 Z0.0
> > >
> > > with acceleration at 25in/sec^2, jerk at 20E6, it will run HUNDREDS of cycles, never skipping a beat. I have . But, if I do:
> > >
> > > G01 Z-0.5 F150
> > > G01 Z0.0
> > >
> > > even with acceleration reduced by a factor of 5 (to 5in/sec^2), and jerk reduced to 2E5, it faults the servo on EVERY move, and the axis never moves! What is going on here?
> > >
> > > This is the same behavior I've been seeing on my knee - where G0s work perfectly, but when I try to jog with the pendant, I can very easily get faults, even at very low speeds. None of the axes on this machine have ever faulted in the past, unless I ran them into an immovable object.
> > >
> > > Regards,
> > > Ray L.
> > >
> > > --- In DynoMotion@yahoogroups.com, "himykabibble" <jagboy@> wrote:
> > > >
> > > > Tom,
> > > >
> > > > The code is the following two lines repeated many time:
> > > >
> > > > G01 Z-0.1 F30
> > > > G00 Z0.0
> > > >
> > > > The velocity and acceleration settings are what I've been using ever since I built the machine over 3 years ago. Never a problem. In fact, it's capable of more, it's just too scary to crank things up any higher.
> > > >
> > > > Can you explain why KMotionCNC would behave differently from my app? That's the one that really makes no sense to me. I can accept that the servo tuning is not perfect (though it's worked perfectly all these years), but I can't understand why KMotionCNC would not exactly duplicate what my app does, unless the settings in my program are wrong.
> > > >
> > > > Regards,
> > > > Ray L.
> > > >
> > > > --- In DynoMotion@yahoogroups.com, Tom Kerekes <tk@> wrote:
> > > > >
> > > > > Hi Ray,
> > > > > ÃâÃ
> > > > > When you say "200Ãâà IPM rapid back up" I assume youÃâà didn't mean to say "rapid" as in G0?Ãâà It would help to just list the G code.
> > > > > ÃâÃ
> > > > > All we are using here is the Z axis correct?
> > > > > ÃâÃ
> > > > > Your settings are pretty aggressive with acceleration of 25 in/sec2.Ãâà I calculate to move 0.1 inches will only take 0.12 seconds with infinite Jerk (what Mach3 always uses).Ãâà So that explains why "rapids" with KMotionCNC is slower.Ãâà With Jerk limit it takes about 0.27 seconds.Ãâà I often just enter the numbers into the Step Response Screen to visually see the profile.
> > > > > ÃâÃ
> > > > > But I don't understand why feed moves (infinite Jerk) would be different between Mach3 and KMotionCNC.Ãâà I would capture and plot the data to see which is correct.
> > > > > ÃâÃ
> > > > > Yes by all means wire the encoder back to KFLOP to be able to plot the servo performance.
> > > > > ÃâÃ
> > > > > Regards
> > > > > TKÃâÃ
> > > > >
> > > > > From: himykabibble <jagboy@>
> > > > > To: DynoMotion@yahoogroups.com
> > > > > Sent: Thursday, February 2, 2012 6:12 PM
> > > > > Subject: [DynoMotion] Can You Verify My Settings?
> > > > >
> > > > >
> > > > > ÃâÃ
> > > > > Tom,
> > > > >
> > > > > I tried to actually use my machine with my new app today. The good news is the app did nothing unexpected, and I can tell I will really like the UI once it's a bit more polished. One of the things I added last night was I now output the tool table into my G-code, and the G-code loader in my app now finds it, and pushes it into the interpreter automatically. I will make a tool length database, and hook it into that, so the current tool length settings will be automatically updated each time the program is loaded.
> > > > >
> > > > > However, on the first part I tried to cut today, I found it losing position on the quill when doing peck drilling. This always occurred on the up-move. After digging into this a bit, I came up with a simple test program that does a short feed move down at F30, then a 200 IPM rapid back up to the start position. It just does this over, and over, and over. When I run this with my app, I get *constant* faults on the quill servo (something I've never seen in 3 years with this machine). When I run it under KMotionCNC, with what *should* be the same settings, I get occasional faults. When I run it under Mach3 (still with the KFlop), I get no faults.
> > > > >
> > > > > Why would I get a different result running my app vs KMotionCNC? Or even Mach3 for that matter? I believe the settings are exactly the same, as follows:
> > > > >
> > > > > X/Y Steps/Inch: 20000
> > > > > X/Y Vel: 200 IPM | 66667 counts/sec
> > > > > X/Y Accel: 25 in/sec^2 | 500000counts/sec^2
> > > > > X/Y Jerk: 2E6
> > > > >
> > > > > Z Steps/Inch: 20320
> > > > > Z Vel: 150 IPM/50800 counts/sec
> > > > > Z Accel: 25 in/sec^2 | 508000 counts/sec*2
> > > > > Z Jerk: 2E6
> > > > >
> > > > > A Steps/Inch: 96000
> > > > > A Vel: 50 IPM | 80000
> > > > > A Accel: 5 in/sec^2 | 480000
> > > > > A Jerk: 2E6
> > > > >
> > > > > Any ideas?
> > > > >
> > > > > One significant difference I noted between running with Mach3 and running with KMotion - I changed the program to be a 100IPM feed down to -0.1, then a rapid back up to 0.0. If I run this under Mach3, the quill moves up and down VERY quickly, probably making 2-3 cycles/second. Under KMotionCNC and my app, the time to complete each down and up cycle is probably 2-3X what it is in Mach3 - completing no more than one cycle per second.
> > > > >
> > > > > Regards,
> > > > > Ray L.
> > > > >
> > > >
> > >
> >
>
|
|
Group: DynoMotion |
Message: 3700 |
From: himykabibble |
Date: 2/3/2012 |
Subject: Re: Can You Verify My Settings? |
I've also read back the axis acceleration settings in KMotion, and those too are correct.
Regards,
Ray L.
--- In DynoMotion@yahoogroups.com, "himykabibble" <jagboy@...> wrote:
>
> Brad,
>
> I've just read back the Interpreter and CoordMotion parameters for all six axes,and they all read back what they should. Where else could this possibly be coming from?
>
> I've had no luck getting VS2010 Express to let me debug into the DLLs.
>
> Regards,
> Ray L.
>
> --- In DynoMotion@yahoogroups.com, brad murry <bradodarb@> wrote:
> >
> > You can check values once you set them, the .net properties do not actually retain data, they merely get and set public members in the c++ code. This means if you set a value and then check it you are reading the values in the underlying libraries. As an added test you can verify values with script commands.
> >
> > I have played with accels and velocities and it seems to work for me.
> >
> > -Brad Murry
> > ________________________________
> > From: Tom Kerekes
> > Sent: 2/3/2012 12:11 PM
> > To: DynoMotion@yahoogroups.com
> > Subject: Re: [DynoMotion] Re: Can You Verify My Settings?
> >
> > Hi Ray,
> >
> > I don't see anything wrong. Again the simplest thing would just be to use the debugger to check what Aceleration is actually being used in the Trajectory Planner. If it is wrong, work backwards to find the disconnect. That's the nice thing about having all the source code.
> >
> > I agree it most likely an issue with the .NET. If you want to post your code I can try to find time to debug it. But I would need everything including the .NET interface you are currently using.
> >
> > One other possibility might be the feed rate override being set to infinity or something.
> >
> > Regards
> > TK
> >
> >
> >
> >
> >
> > From: himykabibble <jagboy@>
> > To: DynoMotion@yahoogroups.com
> > Sent: Friday, February 3, 2012 10:25 AM
> > Subject: [DynoMotion] Re: Can You Verify My Settings?
> >
> >
> >
> > Tom,
> >
> > I just tried KMotionCNC again, and it is NOT having this problem, which suggests to me I'm either not doing some essential initialization, or there's a bug in dotNet, and it;s not doing the requested initialization correctly. Both my app and KMotionCNC are using the exact same Init.c, so my init code and dotNet appear to me to be the only variables, as the only other thing my app is doing is passing the G-code file to the interpreter.
> >
> > Am I doing the right init? Am I doing it at the right time???
> >
> > Kinda smells like the axis parameters are not "taking", since changing acceleration and velocity all over the map makes NO difference in the behavior.
> >
> > Below is ALL of the init I'm doing in my app, other than loading the Init.c. This is all done when the first connection is established on app startup. If the connection is lost, only Init.c is re-loaded when the connection comes back.
> >
> > private void InitAxes()
> > {
> > // Define the axes
> > KMAxes = new Dictionary<string, KMotion_dotNet.KM_Axis>();
> > KMAxes.Add("XAxis", new KMotion_dotNet.KM_Axis(KMController, 0, "XAxis"));
> > KMAxes.Add("YAxis", new KMotion_dotNet.KM_Axis(KMController, 1, "YAxis"));
> > KMAxes.Add("ZAxis", new KMotion_dotNet.KM_Axis(KMController, 2, "ZAxis"));
> > KMAxes.Add("AAxis", new KMotion_dotNet.KM_Axis(KMController, 3, "AAxis"));
> >
> > KMController.AxisChannels = KMAxes;
> >
> > KMController.CoordMotion.Abort();
> > KMController.CoordMotion.ClearAbort();
> >
> > KMController.CoordMotion.MotionParams.CountsPerInchX = StepsPerInchX;
> > KMController.CoordMotion.MotionParams.MaxVelX = MaxVelX;
> > KMController.CoordMotion.MotionParams.MaxAccelX = AccelX;
> > KMController.WriteLine("EnableAxis0");
> >
> > KMController.CoordMotion.MotionParams.CountsPerInchY = StepsPerInchY;
> > KMController.CoordMotion.MotionParams.MaxVelY = MaxVelY;
> > KMController.CoordMotion.MotionParams.MaxAccelY = AccelY;
> > KMController.WriteLine("EnableAxis1");
> >
> > KMController.CoordMotion.MotionParams.CountsPerInchZ = StepsPerInchZ;
> > KMController.CoordMotion.MotionParams.MaxVelZ = MaxVelZ;
> > KMController.CoordMotion.MotionParams.MaxAccelZ = AccelZ;
> > KMController.WriteLine("EnableAxis2");
> >
> > KMController.CoordMotion.MotionParams.CountsPerInchA = StepsPerInchA;
> > KMController.CoordMotion.MotionParams.MaxVelA = MaxVelA;
> > KMController.CoordMotion.MotionParams.MaxAccelA = AccelA;
> > KMController.WriteLine("EnableAxis3");
> >
> > KMController.WriteLine("DefineCS = 0 1 2 3 -1 -1");
> > }
> >
> > public void InterpreterInit()
> > {
> > KMController.Interpreter.Interpreter_CoordMotionStraightFeed +=
> > new KM_CoordMotionStraightFeedHandler(Interpreter_Interpreter_CoordMotionStraightFeed);
> > KMController.Interpreter.Interpreter_CoordMotionStraightTraverse +=
> > new KM_CoordMotionStraightTraverseHandler(Interpreter_Interpreter_CoordMotionStraightTraverse);
> > KMController.Interpreter.Interpreter_CoordMotionArcFeed +=
> > new KM_CoordMotionArcFeedHandler(Interpreter_Interpreter_CoordMotionArcFeed);
> > KMController.Interpreter.InterpreterCompleted +=
> > new KM_Controller.KM_Interpreter.KM_GCodeInterpreterCompleteHandler(Interpreter_InterpreterCompleted);
> > KMController.Interpreter.InterpreterStatusUpdated +=
> > new KM_Controller.KM_Interpreter.KM_GCodeInterpreterStatusHandler(Interpreter_InterpreterStatusUpdated);
> >
> > KMController.Interpreter.MainPathRoot = @"C:\KMotion428";
> >
> > KMController.Interpreter.CountsPerInchX = StepsPerInchX;
> > KMController.Interpreter.MaxVelX = MaxVelX;
> > KMController.Interpreter.MaxAccelX = AccelX;
> >
> > KMController.Interpreter.CountsPerInchY = StepsPerInchY;
> > KMController.Interpreter.MaxVelY = MaxVelY;
> > KMController.Interpreter.MaxAccelY = AccelY;
> >
> > KMController.Interpreter.CountsPerInchZ = StepsPerInchZ;
> > KMController.Interpreter.MaxVelZ = MaxVelZ;
> > KMController.Interpreter.MaxAccelZ = AccelZ;
> >
> > KMController.Interpreter.CountsPerInchA = StepsPerInchA;
> > KMController.Interpreter.MaxVelA = MaxVelA;
> > KMController.Interpreter.MaxAccelA = AccelA;
> >
> > KMController.Interpreter.BreakAngle = 30;
> >
> > KMController.Interpreter.SetupParams.LengthUnits = KMotion_dotNet.CANON_UNITS.CANON_UNITS_INCHES;
> > KMController.Interpreter.SetupParams.X_AxisOffset = 0.0;
> > KMController.Interpreter.SetupParams.Y_AxisOffset = 0.0;
> > KMController.Interpreter.SetupParams.Z_AxisOffset = 0.0;
> >
> > KMController.Interpreter.SetupParams.BlockDelete = true;
> >
> > KMController.Interpreter.SetupParams.RadiusCompSide = KMotion_dotNet.CANON_SIDE.CANON_SIDE_OFF;
> > KMController.Interpreter.SetupParams.Cycle_R = 0.0;
> > KMController.Interpreter.SetupParams.Cycle_Z = 0.0;
> >
> > KMController.Interpreter.SetupParams.DistanceMode = KMotion_dotNet.DISTANCE_MODE.MODE_ABSOLUTE;
> >
> > KMController.Interpreter.SetupParams.FeedMode = 2;
> >
> > KMController.Interpreter.SetupParams.FloodCoolantOn = false;
> > KMController.Interpreter.SetupParams.MistCoolantOn = false;
> >
> > KMController.Interpreter.SetupParams.CurrentMotionMode = 80;
> >
> > KMController.Interpreter.SetupParams.WorkPlane = KMotion_dotNet.CANON_PLANE.CANON_PLANE_XY;
> >
> > KMController.Interpreter.SetupParams.ToolLengthOffsetIndex = 1;
> > KMController.Interpreter.SetupParams.RadiusComp = 1;
> >
> > KMController.Interpreter.SetupParams.SelectedToolSlot = 1;
> > KMController.Interpreter.SetupParams.TraverseSpeed = 200;
> > KMController.Interpreter.SetupParams.SpindleDirection = KMotion_dotNet.CANON_DIRECTION.CANON_STOPPED;
> > KMController.Interpreter.SetupParams.ToolLengthOffset = 0.0;
> >
> > KMController.Interpreter.SetMcodeAction(3, MCODE_TYPE.M_Action_SetTwoBits, 27, 1, 28, 0, 0, "SpindleCW");
> > KMController.Interpreter.SetMcodeAction(4, MCODE_TYPE.M_Action_SetTwoBits, 27, 0, 28, 1, 0, "SpindleCCW");
> > KMController.Interpreter.SetMcodeAction(5, MCODE_TYPE.M_Action_SetTwoBits, 27, 0, 28, 0, 0, "SpindleOff");
> > KMController.Interpreter.SetMcodeAction(7, MCODE_TYPE.M_Action_Setbit, 3, 1, 0, 0, 0, "MistOn");
> > KMController.Interpreter.SetMcodeAction(8, MCODE_TYPE.M_Action_Setbit, 4, 1, 0, 0, 0, "FloodOn");
> > KMController.Interpreter.SetMcodeAction(9, MCODE_TYPE.M_Action_SetTwoBits, 3, 0, 4, 0, 0, "CoolantOff");
> > KMController.Interpreter.SetMcodeAction(10, MCODE_TYPE.M_Action_Program, 2, 4, 0, 0, 0, @"C:\My KFlop C Programs\KMotionCNC\KMotionCNCSpindlePWM.c");
> > KMController.Interpreter.SetMcodeAction(21, MCODE_TYPE.M_Action_Program, 4, 10, 28, 0, 0, @"C:\My KFlop C Programs\KMotionCNC\KMotionCNCMCodeHandler.c");
> >
> > KMController.Interpreter.InitializeOnExecute = false;
> > KMController.Interpreter.InitializeInterpreter();
> >
> > InterpreterInitialized = true;
> >
> > RunCommand(@"C:\KMotion428\GCode Programs\Init.nc", "G20 F0 S0 G54", true);
> >
> > while (InterpreterIsRunning)
> > ;
> > }
> >
> > Regards,
> > Ray L.
> >
> > --- In DynoMotion@yahoogroups.com, Tom Kerekes <tk@> wrote:
> > >
> > > Hi Ray,
> > > Ã
> > > Sounds like a bug.Ã Is that from your code?Ã Maybe some parameter is not being set?Ã You will probably have to step into the code to figure it out.Ã Otherwise capture the output motion to see what the really acceleration is.
> > > Ã
> > > Which connectors are you using.Ã You can multiplex the encoder inputs to JP4 and JP6 if that helps.
> > > Ã
> > > Regards
> > > TK
> > >
> > >
> > > ________________________________
> > > From: himykabibble <jagboy@>
> > > To: DynoMotion@yahoogroups.com
> > > Sent: Friday, February 3, 2012 9:14 AM
> > > Subject: [DynoMotion] Re: Can You Verify My Settings?
> > >
> > >
> > > Ã
> > > Just a little more data:
> > >
> > > I increased velocity to 200 IPM (67733), acceleration to 35 in/sec^2 (700000), and jerk to 2E12, and I get VERY rare faults when running G0s - perhaps one every few hundred cycles. This is perfectly consistent with what I saw when I first setup the system with Mach3. With the 5X reduced settings in my previous post, I still get CONSTANT faults running G1s, even with the Feedrate specified as only 15 IPM. Why is the response to G1s so radically different from G0s?
> > >
> > > Unfortunately, no easy way to wire encoders in, as I'm using the encoder pins for other things, and I'm not keen on re-wiring just now. But, it seems to me the fact that I can run such aggressive parameters with G0s indicates the servo tuning is not all that far from optimal.
> > >
> > > Regards,
> > > Ray L.
> > >
> > > --- In DynoMotion@yahoogroups.com, "himykabibble" <jagboy@> wrote:
> > > >
> > > > Tom,
> > > >
> > > > I'm stumped here.... If I do:
> > > >
> > > > G00 Z-0.5
> > > > G00 Z0.0
> > > >
> > > > with acceleration at 25in/sec^2, jerk at 20E6, it will run HUNDREDS of cycles, never skipping a beat. I have . But, if I do:
> > > >
> > > > G01 Z-0.5 F150
> > > > G01 Z0.0
> > > >
> > > > even with acceleration reduced by a factor of 5 (to 5in/sec^2), and jerk reduced to 2E5, it faults the servo on EVERY move, and the axis never moves! What is going on here?
> > > >
> > > > This is the same behavior I've been seeing on my knee - where G0s work perfectly, but when I try to jog with the pendant, I can very easily get faults, even at very low speeds. None of the axes on this machine have ever faulted in the past, unless I ran them into an immovable object.
> > > >
> > > > Regards,
> > > > Ray L.
> > > >
> > > > --- In DynoMotion@yahoogroups.com, "himykabibble" <jagboy@> wrote:
> > > > >
> > > > > Tom,
> > > > >
> > > > > The code is the following two lines repeated many time:
> > > > >
> > > > > G01 Z-0.1 F30
> > > > > G00 Z0.0
> > > > >
> > > > > The velocity and acceleration settings are what I've been using ever since I built the machine over 3 years ago. Never a problem. In fact, it's capable of more, it's just too scary to crank things up any higher.
> > > > >
> > > > > Can you explain why KMotionCNC would behave differently from my app? That's the one that really makes no sense to me. I can accept that the servo tuning is not perfect (though it's worked perfectly all these years), but I can't understand why KMotionCNC would not exactly duplicate what my app does, unless the settings in my program are wrong.
> > > > >
> > > > > Regards,
> > > > > Ray L.
> > > > >
> > > > > --- In DynoMotion@yahoogroups.com, Tom Kerekes <tk@> wrote:
> > > > > >
> > > > > > Hi Ray,
> > > > > > ÃâÃ
> > > > > > When you say "200Ãâà IPM rapid back up" I assume youÃâà didn't mean to say "rapid" as in G0?Ãâà It would help to just list the G code.
> > > > > > ÃâÃ
> > > > > > All we are using here is the Z axis correct?
> > > > > > ÃâÃ
> > > > > > Your settings are pretty aggressive with acceleration of 25 in/sec2.Ãâà I calculate to move 0.1 inches will only take 0.12 seconds with infinite Jerk (what Mach3 always uses).Ãâà So that explains why "rapids" with KMotionCNC is slower.Ãâà With Jerk limit it takes about 0.27 seconds.Ãâà I often just enter the numbers into the Step Response Screen to visually see the profile.
> > > > > > ÃâÃ
> > > > > > But I don't understand why feed moves (infinite Jerk) would be different between Mach3 and KMotionCNC.Ãâà I would capture and plot the data to see which is correct.
> > > > > > ÃâÃ
> > > > > > Yes by all means wire the encoder back to KFLOP to be able to plot the servo performance.
> > > > > > ÃâÃ
> > > > > > Regards
> > > > > > TKÃâÃ
> > > > > >
> > > > > > From: himykabibble <jagboy@>
> > > > > > To: DynoMotion@yahoogroups.com
> > > > > > Sent: Thursday, February 2, 2012 6:12 PM
> > > > > > Subject: [DynoMotion] Can You Verify My Settings?
> > > > > >
> > > > > >
> > > > > > ÃâÃ
> > > > > > Tom,
> > > > > >
> > > > > > I tried to actually use my machine with my new app today. The good news is the app did nothing unexpected, and I can tell I will really like the UI once it's a bit more polished. One of the things I added last night was I now output the tool table into my G-code, and the G-code loader in my app now finds it, and pushes it into the interpreter automatically. I will make a tool length database, and hook it into that, so the current tool length settings will be automatically updated each time the program is loaded.
> > > > > >
> > > > > > However, on the first part I tried to cut today, I found it losing position on the quill when doing peck drilling. This always occurred on the up-move. After digging into this a bit, I came up with a simple test program that does a short feed move down at F30, then a 200 IPM rapid back up to the start position. It just does this over, and over, and over. When I run this with my app, I get *constant* faults on the quill servo (something I've never seen in 3 years with this machine). When I run it under KMotionCNC, with what *should* be the same settings, I get occasional faults. When I run it under Mach3 (still with the KFlop), I get no faults.
> > > > > >
> > > > > > Why would I get a different result running my app vs KMotionCNC? Or even Mach3 for that matter? I believe the settings are exactly the same, as follows:
> > > > > >
> > > > > > X/Y Steps/Inch: 20000
> > > > > > X/Y Vel: 200 IPM | 66667 counts/sec
> > > > > > X/Y Accel: 25 in/sec^2 | 500000counts/sec^2
> > > > > > X/Y Jerk: 2E6
> > > > > >
> > > > > > Z Steps/Inch: 20320
> > > > > > Z Vel: 150 IPM/50800 counts/sec
> > > > > > Z Accel: 25 in/sec^2 | 508000 counts/sec*2
> > > > > > Z Jerk: 2E6
> > > > > >
> > > > > > A Steps/Inch: 96000
> > > > > > A Vel: 50 IPM | 80000
> > > > > > A Accel: 5 in/sec^2 | 480000
> > > > > > A Jerk: 2E6
> > > > > >
> > > > > > Any ideas?
> > > > > >
> > > > > > One significant difference I noted between running with Mach3 and running with KMotion - I changed the program to be a 100IPM feed down to -0.1, then a rapid back up to 0.0. If I run this under Mach3, the quill moves up and down VERY quickly, probably making 2-3 cycles/second. Under KMotionCNC and my app, the time to complete each down and up cycle is probably 2-3X what it is in Mach3 - completing no more than one cycle per second.
> > > > > >
> > > > > > Regards,
> > > > > > Ray L.
> > > > > >
> > > > >
> > > >
> > >
> >
>
|
|
Group: DynoMotion |
Message: 3703 |
From: Tom Kerekes |
Date: 2/3/2012 |
Subject: Re: Can You Verify My Settings? |
Hi Ray,
The acceration settings that you read using KMotion Console Commands are reading values in KFLOP which do not affect the Trajectory Planning. In a KMotion System there are fundamentally two types of motions: Independent axis motions and Coordinated Motions created by the Trajectory Planner. Your problem seems to be with the Trajectory Planner Settings (G1,G2,G3 type of motions).
Regards
TK
Group: DynoMotion |
Message: 3704 |
From: himykabibble |
Date: 2/3/2012 |
Subject: Re: Can You Verify My Settings? |
Tom,
Seems to me there must be only a very few places this could be going sideways. Since it works with KMotionCNC, I would think that tells us
the machine is OK, everything on the board is OK, and the DLLs must all be OK, since all that is shared between my app and KMotionCNC, right? You've looked at my init code, and don't seem to see a problem, and I've read back the values the init code is writing, and they are all correct. What else COULD cause this? Is there some init file that might not be getting loaded when my app runs? I think the fact that it seems completely oblivious to the settings I program in is a major clue. How is that possible? Whatever the problem is, I'm betting it's something pretty simple and basic....
If I commented out my init code, ran KMotionCNC, THEN ran my app, would the planner settings carry over?
Regards,
Ray L.
--- In DynoMotion@yahoogroups.com, Tom Kerekes <tk@...> wrote:
>
> Hi Ray,
> Â
> The acceration settings that you read using KMotion Console Commands are reading values in KFLOP which do not affect the Trajectory Planning. In a KMotion System there are fundamentally two types of motions: Independent axis motions and Coordinated Motions created by the Trajectory Planner. Your problem seems to be with the Trajectory Planner Settings (G1,G2,G3 type of motions).
> Â
> Regards
> TKÂ
> From: himykabibble <jagboy@...>
> To: DynoMotion@yahoogroups.com
> Sent: Friday, February 3, 2012 11:56 AM
> Subject: [DynoMotion] Re: Can You Verify My Settings?
>
>
> Â
> I've also read back the axis acceleration settings in KMotion, and those too are correct.
>
> Regards,
> Ray L.
>
> --- In DynoMotion@yahoogroups.com, "himykabibble" <jagboy@> wrote:
> >
> > Brad,
> >
> > I've just read back the Interpreter and CoordMotion parameters for all six axes,and they all read back what they should. Where else could this possibly be coming from?
> >
> > I've had no luck getting VS2010 Express to let me debug into the DLLs.
> >
> > Regards,
> > Ray L.
> >
> > --- In DynoMotion@yahoogroups.com, brad murry <bradodarb@> wrote:
> > >
> > > You can check values once you set them, the .net properties do not actually retain data, they merely get and set public members in the c++ code. This means if you set a value and then check it you are reading the values in the underlying libraries. As an added test you can verify values with script commands.
> > >
> > > I have played with accels and velocities and it seems to work for me.
> > >
> > > -Brad Murry
> > > ________________________________
> > > From: Tom Kerekes
> > > Sent: 2/3/2012 12:11 PM
> > > To: DynoMotion@yahoogroups.com
> > > Subject: Re: [DynoMotion] Re: Can You Verify My Settings?
> > >
> > > Hi Ray,
> > >
> > > I don't see anything wrong. Again the simplest thing would just be to use the debugger to check what Aceleration is actually being used in the Trajectory Planner. If it is wrong, work backwards to find the disconnect. That's the nice thing about having all the source code.
> > >
> > > I agree it most likely an issue with the .NET. If you want to post your code I can try to find time to debug it. But I would need everything including the .NET interface you are currently using.
> > >
> > > One other possibility might be the feed rate override being set to infinity or something.
> > >
> > > Regards
> > > TK
> > >
> > >
> > >
> > >
> > >
> > > From: himykabibble <jagboy@>
> > > To: DynoMotion@yahoogroups.com
> > > Sent: Friday, February 3, 2012 10:25 AM
> > > Subject: [DynoMotion] Re: Can You Verify My Settings?
> > >
> > >
> > >
> > > Tom,
> > >
> > > I just tried KMotionCNC again, and it is NOT having this problem, which suggests to me I'm either not doing some essential initialization, or there's a bug in dotNet, and it;s not doing the requested initialization correctly. Both my app and KMotionCNC are using the exact same Init.c, so my init code and dotNet appear to me to be the only variables, as the only other thing my app is doing is passing the G-code file to the interpreter.
> > >
> > > Am I doing the right init? Am I doing it at the right time???
> > >
> > > Kinda smells like the axis parameters are not "taking", since changing acceleration and velocity all over the map makes NO difference in the behavior.
> > >
> > > Below is ALL of the init I'm doing in my app, other than loading the Init.c. This is all done when the first connection is established on app startup. If the connection is lost, only Init.c is re-loaded when the connection comes back.
> > >
> > > private void InitAxes()
> > > {
> > > // Define the axes
> > > KMAxes = new Dictionary<string, KMotion_dotNet.KM_Axis>();
> > > KMAxes.Add("XAxis", new KMotion_dotNet.KM_Axis(KMController, 0, "XAxis"));
> > > KMAxes.Add("YAxis", new KMotion_dotNet.KM_Axis(KMController, 1, "YAxis"));
> > > KMAxes.Add("ZAxis", new KMotion_dotNet.KM_Axis(KMController, 2, "ZAxis"));
> > > KMAxes.Add("AAxis", new KMotion_dotNet.KM_Axis(KMController, 3, "AAxis"));
> > >
> > > KMController.AxisChannels = KMAxes;
> > >
> > > KMController.CoordMotion.Abort();
> > > KMController.CoordMotion.ClearAbort();
> > >
> > > KMController.CoordMotion.MotionParams.CountsPerInchX = StepsPerInchX;
> > > KMController.CoordMotion.MotionParams.MaxVelX = MaxVelX;
> > > KMController.CoordMotion.MotionParams.MaxAccelX = AccelX;
> > > KMController.WriteLine("EnableAxis0");
> > >
> > > KMController.CoordMotion.MotionParams.CountsPerInchY = StepsPerInchY;
> > > KMController.CoordMotion.MotionParams.MaxVelY = MaxVelY;
> > > KMController.CoordMotion.MotionParams.MaxAccelY = AccelY;
> > > KMController.WriteLine("EnableAxis1");
> > >
> > > KMController.CoordMotion.MotionParams.CountsPerInchZ = StepsPerInchZ;
> > > KMController.CoordMotion.MotionParams.MaxVelZ = MaxVelZ;
> > > KMController.CoordMotion.MotionParams.MaxAccelZ = AccelZ;
> > > KMController.WriteLine("EnableAxis2");
> > >
> > > KMController.CoordMotion.MotionParams.CountsPerInchA = StepsPerInchA;
> > > KMController.CoordMotion.MotionParams.MaxVelA = MaxVelA;
> > > KMController.CoordMotion.MotionParams.MaxAccelA = AccelA;
> > > KMController.WriteLine("EnableAxis3");
> > >
> > > KMController.WriteLine("DefineCS = 0 1 2 3 -1 -1");
> > > }
> > >
> > > public void InterpreterInit()
> > > {
> > > KMController.Interpreter.Interpreter_CoordMotionStraightFeed +=
> > > new KM_CoordMotionStraightFeedHandler(Interpreter_Interpreter_CoordMotionStraightFeed);
> > > KMController.Interpreter.Interpreter_CoordMotionStraightTraverse +=
> > > new KM_CoordMotionStraightTraverseHandler(Interpreter_Interpreter_CoordMotionStraightTraverse);
> > > KMController.Interpreter.Interpreter_CoordMotionArcFeed +=
> > > new KM_CoordMotionArcFeedHandler(Interpreter_Interpreter_CoordMotionArcFeed);
> > > KMController.Interpreter.InterpreterCompleted +=
> > > new KM_Controller.KM_Interpreter.KM_GCodeInterpreterCompleteHandler(Interpreter_InterpreterCompleted);
> > > KMController.Interpreter.InterpreterStatusUpdated +=
> > > new KM_Controller.KM_Interpreter.KM_GCodeInterpreterStatusHandler(Interpreter_InterpreterStatusUpdated);
> > >
> > > KMController.Interpreter.MainPathRoot = @"C:\KMotion428";
> > >
> > > KMController.Interpreter.CountsPerInchX = StepsPerInchX;
> > > KMController.Interpreter.MaxVelX = MaxVelX;
> > > KMController.Interpreter.MaxAccelX = AccelX;
> > >
> > > KMController.Interpreter.CountsPerInchY = StepsPerInchY;
> > > KMController.Interpreter.MaxVelY = MaxVelY;
> > > KMController.Interpreter.MaxAccelY = AccelY;
> > >
> > > KMController.Interpreter.CountsPerInchZ = StepsPerInchZ;
> > > KMController.Interpreter.MaxVelZ = MaxVelZ;
> > > KMController.Interpreter.MaxAccelZ = AccelZ;
> > >
> > > KMController.Interpreter.CountsPerInchA = StepsPerInchA;
> > > KMController.Interpreter.MaxVelA = MaxVelA;
> > > KMController.Interpreter.MaxAccelA = AccelA;
> > >
> > > KMController.Interpreter.BreakAngle = 30;
> > >
> > > KMController.Interpreter.SetupParams.LengthUnits = KMotion_dotNet.CANON_UNITS.CANON_UNITS_INCHES;
> > > KMController.Interpreter.SetupParams.X_AxisOffset = 0.0;
> > > KMController.Interpreter.SetupParams.Y_AxisOffset = 0.0;
> > > KMController.Interpreter.SetupParams.Z_AxisOffset = 0.0;
> > >
> > > KMController.Interpreter.SetupParams.BlockDelete = true;
> > >
> > > KMController.Interpreter.SetupParams.RadiusCompSide = KMotion_dotNet.CANON_SIDE.CANON_SIDE_OFF;
> > > KMController.Interpreter.SetupParams.Cycle_R = 0.0;
> > > KMController.Interpreter.SetupParams.Cycle_Z = 0.0;
> > >
> > > KMController.Interpreter.SetupParams.DistanceMode = KMotion_dotNet.DISTANCE_MODE.MODE_ABSOLUTE;
> > >
> > > KMController.Interpreter.SetupParams.FeedMode = 2;
> > >
> > > KMController.Interpreter.SetupParams.FloodCoolantOn = false;
> > > KMController.Interpreter.SetupParams.MistCoolantOn = false;
> > >
> > > KMController.Interpreter.SetupParams.CurrentMotionMode = 80;
> > >
> > > KMController.Interpreter.SetupParams.WorkPlane = KMotion_dotNet.CANON_PLANE.CANON_PLANE_XY;
> > >
> > > KMController.Interpreter.SetupParams.ToolLengthOffsetIndex = 1;
> > > KMController.Interpreter.SetupParams.RadiusComp = 1;
> > >
> > > KMController.Interpreter.SetupParams.SelectedToolSlot = 1;
> > > KMController.Interpreter.SetupParams.TraverseSpeed = 200;
> > > KMController.Interpreter.SetupParams.SpindleDirection = KMotion_dotNet.CANON_DIRECTION.CANON_STOPPED;
> > > KMController.Interpreter.SetupParams.ToolLengthOffset = 0.0;
> > >
> > > KMController.Interpreter.SetMcodeAction(3, MCODE_TYPE.M_Action_SetTwoBits, 27, 1, 28, 0, 0, "SpindleCW");
> > > KMController.Interpreter.SetMcodeAction(4, MCODE_TYPE.M_Action_SetTwoBits, 27, 0, 28, 1, 0, "SpindleCCW");
> > > KMController.Interpreter.SetMcodeAction(5, MCODE_TYPE.M_Action_SetTwoBits, 27, 0, 28, 0, 0, "SpindleOff");
> > > KMController.Interpreter.SetMcodeAction(7, MCODE_TYPE.M_Action_Setbit, 3, 1, 0, 0, 0, "MistOn");
> > > KMController.Interpreter.SetMcodeAction(8, MCODE_TYPE.M_Action_Setbit, 4, 1, 0, 0, 0, "FloodOn");
> > > KMController.Interpreter.SetMcodeAction(9, MCODE_TYPE.M_Action_SetTwoBits, 3, 0, 4, 0, 0, "CoolantOff");
> > > KMController.Interpreter.SetMcodeAction(10, MCODE_TYPE.M_Action_Program, 2, 4, 0, 0, 0, @"C:\My KFlop C Programs\KMotionCNC\KMotionCNCSpindlePWM.c");
> > > KMController.Interpreter.SetMcodeAction(21, MCODE_TYPE.M_Action_Program, 4, 10, 28, 0, 0, @"C:\My KFlop C Programs\KMotionCNC\KMotionCNCMCodeHandler.c");
> > >
> > > KMController.Interpreter.InitializeOnExecute = false;
> > > KMController.Interpreter.InitializeInterpreter();
> > >
> > > InterpreterInitialized = true;
> > >
> > > RunCommand(@"C:\KMotion428\GCode Programs\Init.nc", "G20 F0 S0 G54", true);
> > >
> > > while (InterpreterIsRunning)
> > > ;
> > > }
> > >
> > > Regards,
> > > Ray L.
> > >
> > > --- In DynoMotion@yahoogroups.com, Tom Kerekes <tk@> wrote:
> > > >
> > > > Hi Ray,
> > > > Ãâ
> > > > Sounds like a bug.Ãâ Is that from your code?Ãâ Maybe some parameter is not being set?Ãâ You will probably have to step into the code to figure it out.Ãâ Otherwise capture the output motion to see what the really acceleration is.
> > > > Ãâ
> > > > Which connectors are you using.Ãâ You can multiplex the encoder inputs to JP4 and JP6 if that helps.
> > > > Ãâ
> > > > Regards
> > > > TK
> > > >
> > > >
> > > > ________________________________
> > > > From: himykabibble <jagboy@>
> > > > To: DynoMotion@yahoogroups.com
> > > > Sent: Friday, February 3, 2012 9:14 AM
> > > > Subject: [DynoMotion] Re: Can You Verify My Settings?
> > > >
> > > >
> > > > Ãâ
> > > > Just a little more data:
> > > >
> > > > I increased velocity to 200 IPM (67733), acceleration to 35 in/sec^2 (700000), and jerk to 2E12, and I get VERY rare faults when running G0s - perhaps one every few hundred cycles. This is perfectly consistent with what I saw when I first setup the system with Mach3. With the 5X reduced settings in my previous post, I still get CONSTANT faults running G1s, even with the Feedrate specified as only 15 IPM. Why is the response to G1s so radically different from G0s?
> > > >
> > > > Unfortunately, no easy way to wire encoders in, as I'm using the encoder pins for other things, and I'm not keen on re-wiring just now. But, it seems to me the fact that I can run such aggressive parameters with G0s indicates the servo tuning is not all that far from optimal.
> > > >
> > > > Regards,
> > > > Ray L.
> > > >
> > > > --- In DynoMotion@yahoogroups.com, "himykabibble" <jagboy@> wrote:
> > > > >
> > > > > Tom,
> > > > >
> > > > > I'm stumped here.... If I do:
> > > > >
> > > > > G00 Z-0.5
> > > > > G00 Z0.0
> > > > >
> > > > > with acceleration at 25in/sec^2, jerk at 20E6, it will run HUNDREDS of cycles, never skipping a beat. I have . But, if I do:
> > > > >
> > > > > G01 Z-0.5 F150
> > > > > G01 Z0.0
> > > > >
> > > > > even with acceleration reduced by a factor of 5 (to 5in/sec^2), and jerk reduced to 2E5, it faults the servo on EVERY move, and the axis never moves! What is going on here?
> > > > >
> > > > > This is the same behavior I've been seeing on my knee - where G0s work perfectly, but when I try to jog with the pendant, I can very easily get faults, even at very low speeds. None of the axes on this machine have ever faulted in the past, unless I ran them into an immovable object.
> > > > >
> > > > > Regards,
> > > > > Ray L.
> > > > >
> > > > > --- In DynoMotion@yahoogroups.com, "himykabibble" <jagboy@> wrote:
> > > > > >
> > > > > > Tom,
> > > > > >
> > > > > > The code is the following two lines repeated many time:
> > > > > >
> > > > > > G01 Z-0.1 F30
> > > > > > G00 Z0.0
> > > > > >
> > > > > > The velocity and acceleration settings are what I've been using ever since I built the machine over 3 years ago. Never a problem. In fact, it's capable of more, it's just too scary to crank things up any higher.
> > > > > >
> > > > > > Can you explain why KMotionCNC would behave differently from my app? That's the one that really makes no sense to me. I can accept that the servo tuning is not perfect (though it's worked perfectly all these years), but I can't understand why KMotionCNC would not exactly duplicate what my app does, unless the settings in my program are wrong.
> > > > > >
> > > > > > Regards,
> > > > > > Ray L.
> > > > > >
> > > > > > --- In DynoMotion@yahoogroups.com, Tom Kerekes <tk@> wrote:
> > > > > > >
> > > > > > > Hi Ray,
> > > > > > > ÃÆ'ââ¬Å¡Ãâ
> > > > > > > When you say "200ÃÆ'ââ¬Å¡Ãâ IPM rapid back up" I assume youÃÆ'ââ¬Å¡Ãâ didn't mean to say "rapid" as in G0?ÃÆ'ââ¬Å¡Ãâ It would help to just list the G code.
> > > > > > > ÃÆ'ââ¬Å¡Ãâ
> > > > > > > All we are using here is the Z axis correct?
> > > > > > > ÃÆ'ââ¬Å¡Ãâ
> > > > > > > Your settings are pretty aggressive with acceleration of 25 in/sec2.ÃÆ'ââ¬Å¡Ãâ I calculate to move 0.1 inches will only take 0.12 seconds with infinite Jerk (what Mach3 always uses).ÃÆ'ââ¬Å¡Ãâ So that explains why "rapids" with KMotionCNC is slower.ÃÆ'ââ¬Å¡Ãâ With Jerk limit it takes about 0.27 seconds.ÃÆ'ââ¬Å¡Ãâ I often just enter the numbers into the Step Response Screen to visually see the profile.
> > > > > > > ÃÆ'ââ¬Å¡Ãâ
> > > > > > > But I don't understand why feed moves (infinite Jerk) would be different between Mach3 and KMotionCNC.ÃÆ'ââ¬Å¡Ãâ I would capture and plot the data to see which is correct.
> > > > > > > ÃÆ'ââ¬Å¡Ãâ
> > > > > > > Yes by all means wire the encoder back to KFLOP to be able to plot the servo performance.
> > > > > > > ÃÆ'ââ¬Å¡Ãâ
> > > > > > > Regards
> > > > > > > TKÃÆ'ââ¬Å¡Ãâ
> > > > > > >
> > > > > > > From: himykabibble <jagboy@>
> > > > > > > To: DynoMotion@yahoogroups.com
> > > > > > > Sent: Thursday, February 2, 2012 6:12 PM
> > > > > > > Subject: [DynoMotion] Can You Verify My Settings?
> > > > > > >
> > > > > > >
> > > > > > > ÃÆ'ââ¬Å¡Ãâ
> > > > > > > Tom,
> > > > > > >
> > > > > > > I tried to actually use my machine with my new app today. The good news is the app did nothing unexpected, and I can tell I will really like the UI once it's a bit more polished. One of the things I added last night was I now output the tool table into my G-code, and the G-code loader in my app now finds it, and pushes it into the interpreter automatically. I will make a tool length database, and hook it into that, so the current tool length settings will be automatically updated each time the program is loaded.
> > > > > > >
> > > > > > > However, on the first part I tried to cut today, I found it losing position on the quill when doing peck drilling. This always occurred on the up-move. After digging into this a bit, I came up with a simple test program that does a short feed move down at F30, then a 200 IPM rapid back up to the start position. It just does this over, and over, and over. When I run this with my app, I get *constant* faults on the quill servo (something I've never seen in 3 years with this machine). When I run it under KMotionCNC, with what *should* be the same settings, I get occasional faults. When I run it under Mach3 (still with the KFlop), I get no faults.
> > > > > > >
> > > > > > > Why would I get a different result running my app vs KMotionCNC? Or even Mach3 for that matter? I believe the settings are exactly the same, as follows:
> > > > > > >
> > > > > > > X/Y Steps/Inch: 20000
> > > > > > > X/Y Vel: 200 IPM | 66667 counts/sec
> > > > > > > X/Y Accel: 25 in/sec^2 | 500000counts/sec^2
> > > > > > > X/Y Jerk: 2E6
> > > > > > >
> > > > > > > Z Steps/Inch: 20320
> > > > > > > Z Vel: 150 IPM/50800 counts/sec
> > > > > > > Z Accel: 25 in/sec^2 | 508000 counts/sec*2
> > > > > > > Z Jerk: 2E6
> > > > > > >
> > > > > > > A Steps/Inch: 96000
> > > > > > > A Vel: 50 IPM | 80000
> > > > > > > A Accel: 5 in/sec^2 | 480000
> > > > > > > A Jerk: 2E6
> > > > > > >
> > > > > > > Any ideas?
> > > > > > >
> > > > > > > One significant difference I noted between running with Mach3 and running with KMotion - I changed the program to be a 100IPM feed down to -0.1, then a rapid back up to 0.0. If I run this under Mach3, the quill moves up and down VERY quickly, probably making 2-3 cycles/second. Under KMotionCNC and my app, the time to complete each down and up cycle is probably 2-3X what it is in Mach3 - completing no more than one cycle per second.
> > > > > > >
> > > > > > > Regards,
> > > > > > > Ray L.
> > > > > > >
> > > > > >
> > > > >
> > > >
> > >
> >
>
|
|
Group: DynoMotion |
Message: 3705 |
From: brad murry |
Date: 2/3/2012 |
Subject: Re: Can You Verify My Settings? |
Debugging in 2010 may or may not be the issue. You need to make sure you are in debug config, your application settings in c# need to allow unmanaged debugging and if you want to debug deeper than
the interop you will need to set those c++ projects to mixed mode....
-Brad Murry
From:
himykabibble
Sent:
2/3/2012 12:55 PM
To:
DynoMotion@yahoogroups.com
Subject:
[DynoMotion] Re: Can You Verify My Settings?
Brad,
I've just read back the Interpreter and CoordMotion parameters for all six axes,and they all read back what they should. Where else could this possibly be coming from?
I've had no luck getting VS2010 Express to let me debug into the DLLs.
Regards,
Ray L.
--- In DynoMotion@yahoogroups.com, brad murry <bradodarb@...> wrote:
>
> You can check values once you set them, the .net properties do not actually retain data, they merely get and set public members in the c++ code. This means if you set a value and then check it you are reading the values in the underlying libraries. As an
added test you can verify values with script commands.
>
> I have played with accels and velocities and it seems to work for me.
>
> -Brad Murry
> ________________________________
> From: Tom Kerekes
> Sent: 2/3/2012 12:11 PM
> To: DynoMotion@yahoogroups.com
> Subject: Re: [DynoMotion] Re: Can You Verify My Settings?
>
> Hi Ray,
>
> I don't see anything wrong. Again the simplest thing would just be to use the debugger to check what Aceleration is actually being used in the Trajectory Planner. If it is wrong, work backwards to find the disconnect. That's the nice thing about having all
the source code.
>
> I agree it most likely an issue with the .NET. If you want to post your code I can try to find time to debug it. But I would need everything including the .NET interface you are currently using.
>
> One other possibility might be the feed rate override being set to infinity or something.
>
> Regards
> TK
>
>
>
>
>
> From: himykabibble <jagboy@...>
> To: DynoMotion@yahoogroups.com
> Sent: Friday, February 3, 2012 10:25 AM
> Subject: [DynoMotion] Re: Can You Verify My Settings?
>
>
>
> Tom,
>
> I just tried KMotionCNC again, and it is NOT having this problem, which suggests to me I'm either not doing some essential initialization, or there's a bug in dotNet, and it;s not doing the requested initialization correctly. Both my app and KMotionCNC are
using the exact same Init.c, so my init code and dotNet appear to me to be the only variables, as the only other thing my app is doing is passing the G-code file to the interpreter.
>
> Am I doing the right init? Am I doing it at the right time???
>
> Kinda smells like the axis parameters are not "taking", since changing acceleration and velocity all over the map makes NO difference in the behavior.
>
> Below is ALL of the init I'm doing in my app, other than loading the Init.c. This is all done when the first connection is established on app startup. If the connection is lost, only Init.c is re-loaded when the connection comes back.
>
> private void InitAxes()
> {
> // Define the axes
> KMAxes = new Dictionary<string, KMotion_dotNet.KM_Axis>();
> KMAxes.Add("XAxis", new KMotion_dotNet.KM_Axis(KMController, 0, "XAxis"));
> KMAxes.Add("YAxis", new KMotion_dotNet.KM_Axis(KMController, 1, "YAxis"));
> KMAxes.Add("ZAxis", new KMotion_dotNet.KM_Axis(KMController, 2, "ZAxis"));
> KMAxes.Add("AAxis", new KMotion_dotNet.KM_Axis(KMController, 3, "AAxis"));
>
> KMController.AxisChannels = KMAxes;
>
> KMController.CoordMotion.Abort();
> KMController.CoordMotion.ClearAbort();
>
> KMController.CoordMotion.MotionParams.CountsPerInchX = StepsPerInchX;
> KMController.CoordMotion.MotionParams.MaxVelX = MaxVelX;
> KMController.CoordMotion.MotionParams.MaxAccelX = AccelX;
> KMController.WriteLine("EnableAxis0");
>
> KMController.CoordMotion.MotionParams.CountsPerInchY = StepsPerInchY;
> KMController.CoordMotion.MotionParams.MaxVelY = MaxVelY;
> KMController.CoordMotion.MotionParams.MaxAccelY = AccelY;
> KMController.WriteLine("EnableAxis1");
>
> KMController.CoordMotion.MotionParams.CountsPerInchZ = StepsPerInchZ;
> KMController.CoordMotion.MotionParams.MaxVelZ = MaxVelZ;
> KMController.CoordMotion.MotionParams.MaxAccelZ = AccelZ;
> KMController.WriteLine("EnableAxis2");
>
> KMController.CoordMotion.MotionParams.CountsPerInchA = StepsPerInchA;
> KMController.CoordMotion.MotionParams.MaxVelA = MaxVelA;
> KMController.CoordMotion.MotionParams.MaxAccelA = AccelA;
> KMController.WriteLine("EnableAxis3");
>
> KMController.WriteLine("DefineCS = 0 1 2 3 -1 -1");
> }
>
> public void InterpreterInit()
> {
> KMController.Interpreter.Interpreter_CoordMotionStraightFeed +=
> new KM_CoordMotionStraightFeedHandler(Interpreter_Interpreter_CoordMotionStraightFeed);
> KMController.Interpreter.Interpreter_CoordMotionStraightTraverse +=
> new KM_CoordMotionStraightTraverseHandler(Interpreter_Interpreter_CoordMotionStraightTraverse);
> KMController.Interpreter.Interpreter_CoordMotionArcFeed +=
> new KM_CoordMotionArcFeedHandler(Interpreter_Interpreter_CoordMotionArcFeed);
> KMController.Interpreter.InterpreterCompleted +=
> new KM_Controller.KM_Interpreter.KM_GCodeInterpreterCompleteHandler(Interpreter_InterpreterCompleted);
> KMController.Interpreter.InterpreterStatusUpdated +=
> new KM_Controller.KM_Interpreter.KM_GCodeInterpreterStatusHandler(Interpreter_InterpreterStatusUpdated);
>
> KMController.Interpreter.MainPathRoot = @"C:\KMotion428";
>
> KMController.Interpreter.CountsPerInchX = StepsPerInchX;
> KMController.Interpreter.MaxVelX = MaxVelX;
> KMController.Interpreter.MaxAccelX = AccelX;
>
> KMController.Interpreter.CountsPerInchY = StepsPerInchY;
> KMController.Interpreter.MaxVelY = MaxVelY;
> KMController.Interpreter.MaxAccelY = AccelY;
>
> KMController.Interpreter.CountsPerInchZ = StepsPerInchZ;
> KMController.Interpreter.MaxVelZ = MaxVelZ;
> KMController.Interpreter.MaxAccelZ = AccelZ;
>
> KMController.Interpreter.CountsPerInchA = StepsPerInchA;
> KMController.Interpreter.MaxVelA = MaxVelA;
> KMController.Interpreter.MaxAccelA = AccelA;
>
> KMController.Interpreter.BreakAngle = 30;
>
> KMController.Interpreter.SetupParams.LengthUnits = KMotion_dotNet.CANON_UNITS.CANON_UNITS_INCHES;
> KMController.Interpreter.SetupParams.X_AxisOffset = 0.0;
> KMController.Interpreter.SetupParams.Y_AxisOffset = 0.0;
> KMController.Interpreter.SetupParams.Z_AxisOffset = 0.0;
>
> KMController.Interpreter.SetupParams.BlockDelete = true;
>
> KMController.Interpreter.SetupParams.RadiusCompSide = KMotion_dotNet.CANON_SIDE.CANON_SIDE_OFF;
> KMController.Interpreter.SetupParams.Cycle_R = 0.0;
> KMController.Interpreter.SetupParams.Cycle_Z = 0.0;
>
> KMController.Interpreter.SetupParams.DistanceMode = KMotion_dotNet.DISTANCE_MODE.MODE_ABSOLUTE;
>
> KMController.Interpreter.SetupParams.FeedMode = 2;
>
> KMController.Interpreter.SetupParams.FloodCoolantOn = false;
> KMController.Interpreter.SetupParams.MistCoolantOn = false;
>
> KMController.Interpreter.SetupParams.CurrentMotionMode = 80;
>
> KMController.Interpreter.SetupParams.WorkPlane = KMotion_dotNet.CANON_PLANE.CANON_PLANE_XY;
>
> KMController.Interpreter.SetupParams.ToolLengthOffsetIndex = 1;
> KMController.Interpreter.SetupParams.RadiusComp = 1;
>
> KMController.Interpreter.SetupParams.SelectedToolSlot = 1;
> KMController.Interpreter.SetupParams.TraverseSpeed = 200;
> KMController.Interpreter.SetupParams.SpindleDirection = KMotion_dotNet.CANON_DIRECTION.CANON_STOPPED;
> KMController.Interpreter.SetupParams.ToolLengthOffset = 0.0;
>
> KMController.Interpreter.SetMcodeAction(3, MCODE_TYPE.M_Action_SetTwoBits, 27, 1, 28, 0, 0, "SpindleCW");
> KMController.Interpreter.SetMcodeAction(4, MCODE_TYPE.M_Action_SetTwoBits, 27, 0, 28, 1, 0, "SpindleCCW");
> KMController.Interpreter.SetMcodeAction(5, MCODE_TYPE.M_Action_SetTwoBits, 27, 0, 28, 0, 0, "SpindleOff");
> KMController.Interpreter.SetMcodeAction(7, MCODE_TYPE.M_Action_Setbit, 3, 1, 0, 0, 0, "MistOn");
> KMController.Interpreter.SetMcodeAction(8, MCODE_TYPE.M_Action_Setbit, 4, 1, 0, 0, 0, "FloodOn");
> KMController.Interpreter.SetMcodeAction(9, MCODE_TYPE.M_Action_SetTwoBits, 3, 0, 4, 0, 0, "CoolantOff");
> KMController.Interpreter.SetMcodeAction(10, MCODE_TYPE.M_Action_Program, 2, 4, 0, 0, 0, @"C:\My KFlop C Programs\KMotionCNC\KMotionCNCSpindlePWM.c");
> KMController.Interpreter.SetMcodeAction(21, MCODE_TYPE.M_Action_Program, 4, 10, 28, 0, 0, @"C:\My KFlop C Programs\KMotionCNC\KMotionCNCMCodeHandler.c");
>
> KMController.Interpreter.InitializeOnExecute = false;
> KMController.Interpreter.InitializeInterpreter();
>
> InterpreterInitialized = true;
>
> RunCommand(@"C:\KMotion428\GCode Programs\Init.nc", "G20 F0 S0 G54", true);
>
> while (InterpreterIsRunning)
> ;
> }
>
> Regards,
> Ray L.
>
> --- In DynoMotion@yahoogroups.com, Tom Kerekes <tk@> wrote:
> >
> > Hi Ray,
> > Â
> > Sounds like a bug. Is that from your code? Maybe some parameter is not being set? You will probably have to step into the code to figure it out. Otherwise capture the output motion to see what the really acceleration is.
> > Â
> > Which connectors are you using. You can multiplex the encoder inputs to JP4 and JP6 if that helps.
> > Â
> > Regards
> > TK
> >
> >
> > ________________________________
> > From: himykabibble <jagboy@>
> > To: DynoMotion@yahoogroups.com
> > Sent: Friday, February 3, 2012 9:14 AM
> > Subject: [DynoMotion] Re: Can You Verify My Settings?
> >
> >
> > Â
> > Just a little more data:
> >
> > I increased velocity to 200 IPM (67733), acceleration to 35 in/sec^2 (700000), and jerk to 2E12, and I get VERY rare faults when running G0s - perhaps one every few hundred cycles. This is perfectly consistent with what I saw when I first setup the system
with Mach3. With the 5X reduced settings in my previous post, I still get CONSTANT faults running G1s, even with the Feedrate specified as only 15 IPM. Why is the response to G1s so radically different from G0s?
> >
> > Unfortunately, no easy way to wire encoders in, as I'm using the encoder pins for other things, and I'm not keen on re-wiring just now. But, it seems to me the fact that I can run such aggressive parameters with G0s indicates the servo tuning is not all
that far from optimal.
> >
> > Regards,
> > Ray L.
> >
> > --- In DynoMotion@yahoogroups.com, "himykabibble" <jagboy@> wrote:
> > >
> > > Tom,
> > >
> > > I'm stumped here.... If I do:
> > >
> > > G00 Z-0.5
> > > G00 Z0.0
> > >
> > > with acceleration at 25in/sec^2, jerk at 20E6, it will run HUNDREDS of cycles, never skipping a beat. I have . But, if I do:
> > >
> > > G01 Z-0.5 F150
> > > G01 Z0.0
> > >
> > > even with acceleration reduced by a factor of 5 (to 5in/sec^2), and jerk reduced to 2E5, it faults the servo on EVERY move, and the axis never moves! What is going on here?
> > >
> > > This is the same behavior I've been seeing on my knee - where G0s work perfectly, but when I try to jog with the pendant, I can very easily get faults, even at very low speeds. None of the axes on this machine have ever faulted in the past, unless I ran
them into an immovable object.
> > >
> > > Regards,
> > > Ray L.
> > >
> > > --- In DynoMotion@yahoogroups.com, "himykabibble" <jagboy@> wrote:
> > > >
> > > > Tom,
> > > >
> > > > The code is the following two lines repeated many time:
> > > >
> > > > G01 Z-0.1 F30
> > > > G00 Z0.0
> > > >
> > > > The velocity and acceleration settings are what I've been using ever since I built the machine over 3 years ago. Never a problem. In fact, it's capable of more, it's just too scary to crank things up any higher.
> > > >
> > > > Can you explain why KMotionCNC would behave differently from my app? That's the one that really makes no sense to me. I can accept that the servo tuning is not perfect (though it's worked perfectly all these years), but I can't understand why KMotionCNC
would not exactly duplicate what my app does, unless the settings in my program are wrong.
> > > >
> > > > Regards,
> > > > Ray L.
> > > >
> > > > --- In DynoMotion@yahoogroups.com, Tom Kerekes <tk@> wrote:
> > > > >
> > > > > Hi Ray,
> > > > > ÂÂ
> > > > > When you say "200 IPM rapid back up" I assume you didn't mean to say "rapid" as in G0? It would help to just list the G code.
> > > > > ÂÂ
> > > > > All we are using here is the Z axis correct?
> > > > > ÂÂ
> > > > > Your settings are pretty aggressive with acceleration of 25 in/sec2. I calculate to move 0.1 inches will only take 0.12 seconds with infinite Jerk (what Mach3 always uses). So that explains why "rapids" with KMotionCNC is slower.ÂÂ
With Jerk limit it takes about 0.27 seconds. I often just enter the numbers into the Step Response Screen to visually see the profile.
> > > > > ÂÂ
> > > > > But I don't understand why feed moves (infinite Jerk) would be different between Mach3 and KMotionCNC. I would capture and plot the data to see which is correct.
> > > > > ÂÂ
> > > > > Yes by all means wire the encoder back to KFLOP to be able to plot the servo performance.
> > > > > ÂÂ
> > > > > Regards
> > > > > TKÂÂ
> > > > >
> > > > > From: himykabibble <jagboy@>
> > > > > To: DynoMotion@yahoogroups.com
> > > > > Sent: Thursday, February 2, 2012 6:12 PM
> > > > > Subject: [DynoMotion] Can You Verify My Settings?
> > > > >
> > > > >
> > > > > ÂÂ
> > > > > Tom,
> > > > >
> > > > > I tried to actually use my machine with my new app today. The good news is the app did nothing unexpected, and I can tell I will really like the UI once it's a bit more polished. One of the things I added last night was I now output the tool table
into my G-code, and the G-code loader in my app now finds it, and pushes it into the interpreter automatically. I will make a tool length database, and hook it into that, so the current tool length settings will be automatically updated each time the program
is loaded.
> > > > >
> > > > > However, on the first part I tried to cut today, I found it losing position on the quill when doing peck drilling. This always occurred on the up-move. After digging into this a bit, I came up with a simple test program that does a short feed move
down at F30, then a 200 IPM rapid back up to the start position. It just does this over, and over, and over. When I run this with my app, I get *constant* faults on the quill servo (something I've never seen in 3 years with this machine). When I run it under
KMotionCNC, with what *should* be the same settings, I get occasional faults. When I run it under Mach3 (still with the KFlop), I get no faults.
> > > > >
> > > > > Why would I get a different result running my app vs KMotionCNC? Or even Mach3 for that matter? I believe the settings are exactly the same, as follows:
> > > > >
> > > > > X/Y Steps/Inch: 20000
> > > > > X/Y Vel: 200 IPM | 66667 counts/sec
> > > > > X/Y Accel: 25 in/sec^2 | 500000counts/sec^2
> > > > > X/Y Jerk: 2E6
> > > > >
> > > > > Z Steps/Inch: 20320
> > > > > Z Vel: 150 IPM/50800 counts/sec
> > > > > Z Accel: 25 in/sec^2 | 508000 counts/sec*2
> > > > > Z Jerk: 2E6
> > > > >
> > > > > A Steps/Inch: 96000
> > > > > A Vel: 50 IPM | 80000
> > > > > A Accel: 5 in/sec^2 | 480000
> > > > > A Jerk: 2E6
> > > > >
> > > > > Any ideas?
> > > > >
> > > > > One significant difference I noted between running with Mach3 and running with KMotion - I changed the program to be a 100IPM feed down to -0.1, then a rapid back up to 0.0. If I run this under Mach3, the quill moves up and down VERY quickly, probably
making 2-3 cycles/second. Under KMotionCNC and my app, the time to complete each down and up cycle is probably 2-3X what it is in Mach3 - completing no more than one cycle per second.
> > > > >
> > > > > Regards,
> > > > > Ray L.
> > > > >
> > > >
> > >
> >
>
|
|
Group: DynoMotion |
Message: 3707 |
From: himykabibble |
Date: 2/3/2012 |
Subject: Re: Can You Verify My Settings? |
Looks like the Gods of Yahoo decided to eat my last message - it never showed up on the forum. I now have two additional problems:
1) DefineCS does not work. Whether I program it in my init, or do it through KMotions console window, no matter what I set, when I do a "DefineCS" in the console window, it ALWAYS returns "0 1 2 3 -1 -1". Also, the help page on CoordMotion makes reference to the "DefineCS6" command, which I assume doesn't actually exist. I was hoping to swap the Z axis with one of the others, and see if problem #2 below follows....
2) While working on the acceleration problem, I happened to notice that every time I move the X, Y or A axis, the Z axis moves slightly. After jogging the X axis between 0.0 and 1.0 about a dozen times, the Z axis was about 1/8" higher than it should be. At the start of ANY move on ANY axis, the Z axis moves (ALWAYS up) a few thou. If I go into KMotion and set the Z axis Step pin (IO12) as an input, the problem goes away completely. I got out my scope, and, sure enough, there is a burst of pulses coming out of IO12 at the start of any move, even when my machine is completely disconnected from the KFlop, leaving only the passive breakout board connected. This is not noise - I am seeing fast-fall, fast-rise, full-amplitude, rail-to-rail pulses, perhaps a few dozen or so. The signal is otherwise quite clean. I swapped in my backup KFlop, and I see exactly the same thing.
The hits just keep on comin'....
Regards,
Ray L.
--- In DynoMotion@yahoogroups.com, brad murry <bradodarb@...> wrote:
>
> Debugging in 2010 may or may not be the issue. You need to make sure you are in debug config, your application settings in c# need to allow unmanaged debugging and if you want to debug deeper than the interop you will need to set those c++ projects to mixed mode....
>
> -Brad Murry
> ________________________________
> From: himykabibble
> Sent: 2/3/2012 12:55 PM
> To: DynoMotion@yahoogroups.com
> Subject: [DynoMotion] Re: Can You Verify My Settings?
>
> Brad,
>
> I've just read back the Interpreter and CoordMotion parameters for all six axes,and they all read back what they should. Where else could this possibly be coming from?
>
> I've had no luck getting VS2010 Express to let me debug into the DLLs.
>
> Regards,
> Ray L.
>
> --- In DynoMotion@yahoogroups.com, brad murry <bradodarb@> wrote:
> >
> > You can check values once you set them, the .net properties do not actually retain data, they merely get and set public members in the c++ code. This means if you set a value and then check it you are reading the values in the underlying libraries. As an added test you can verify values with script commands.
> >
> > I have played with accels and velocities and it seems to work for me.
> >
> > -Brad Murry
> > ________________________________
> > From: Tom Kerekes
> > Sent: 2/3/2012 12:11 PM
> > To: DynoMotion@yahoogroups.com
> > Subject: Re: [DynoMotion] Re: Can You Verify My Settings?
> >
> > Hi Ray,
> >
> > I don't see anything wrong. Again the simplest thing would just be to use the debugger to check what Aceleration is actually being used in the Trajectory Planner. If it is wrong, work backwards to find the disconnect. That's the nice thing about having all the source code.
> >
> > I agree it most likely an issue with the .NET. If you want to post your code I can try to find time to debug it. But I would need everything including the .NET interface you are currently using.
> >
> > One other possibility might be the feed rate override being set to infinity or something.
> >
> > Regards
> > TK
> >
> >
> >
> >
> >
> > From: himykabibble <jagboy@>
> > To: DynoMotion@yahoogroups.com
> > Sent: Friday, February 3, 2012 10:25 AM
> > Subject: [DynoMotion] Re: Can You Verify My Settings?
> >
> >
> >
> > Tom,
> >
> > I just tried KMotionCNC again, and it is NOT having this problem, which suggests to me I'm either not doing some essential initialization, or there's a bug in dotNet, and it;s not doing the requested initialization correctly. Both my app and KMotionCNC are using the exact same Init.c, so my init code and dotNet appear to me to be the only variables, as the only other thing my app is doing is passing the G-code file to the interpreter.
> >
> > Am I doing the right init? Am I doing it at the right time???
> >
> > Kinda smells like the axis parameters are not "taking", since changing acceleration and velocity all over the map makes NO difference in the behavior.
> >
> > Below is ALL of the init I'm doing in my app, other than loading the Init.c. This is all done when the first connection is established on app startup. If the connection is lost, only Init.c is re-loaded when the connection comes back.
> >
> > private void InitAxes()
> > {
> > // Define the axes
> > KMAxes = new Dictionary<string, KMotion_dotNet.KM_Axis>();
> > KMAxes.Add("XAxis", new KMotion_dotNet.KM_Axis(KMController, 0, "XAxis"));
> > KMAxes.Add("YAxis", new KMotion_dotNet.KM_Axis(KMController, 1, "YAxis"));
> > KMAxes.Add("ZAxis", new KMotion_dotNet.KM_Axis(KMController, 2, "ZAxis"));
> > KMAxes.Add("AAxis", new KMotion_dotNet.KM_Axis(KMController, 3, "AAxis"));
> >
> > KMController.AxisChannels = KMAxes;
> >
> > KMController.CoordMotion.Abort();
> > KMController.CoordMotion.ClearAbort();
> >
> > KMController.CoordMotion.MotionParams.CountsPerInchX = StepsPerInchX;
> > KMController.CoordMotion.MotionParams.MaxVelX = MaxVelX;
> > KMController.CoordMotion.MotionParams.MaxAccelX = AccelX;
> > KMController.WriteLine("EnableAxis0");
> >
> > KMController.CoordMotion.MotionParams.CountsPerInchY = StepsPerInchY;
> > KMController.CoordMotion.MotionParams.MaxVelY = MaxVelY;
> > KMController.CoordMotion.MotionParams.MaxAccelY = AccelY;
> > KMController.WriteLine("EnableAxis1");
> >
> > KMController.CoordMotion.MotionParams.CountsPerInchZ = StepsPerInchZ;
> > KMController.CoordMotion.MotionParams.MaxVelZ = MaxVelZ;
> > KMController.CoordMotion.MotionParams.MaxAccelZ = AccelZ;
> > KMController.WriteLine("EnableAxis2");
> >
> > KMController.CoordMotion.MotionParams.CountsPerInchA = StepsPerInchA;
> > KMController.CoordMotion.MotionParams.MaxVelA = MaxVelA;
> > KMController.CoordMotion.MotionParams.MaxAccelA = AccelA;
> > KMController.WriteLine("EnableAxis3");
> >
> > KMController.WriteLine("DefineCS = 0 1 2 3 -1 -1");
> > }
> >
> > public void InterpreterInit()
> > {
> > KMController.Interpreter.Interpreter_CoordMotionStraightFeed +=
> > new KM_CoordMotionStraightFeedHandler(Interpreter_Interpreter_CoordMotionStraightFeed);
> > KMController.Interpreter.Interpreter_CoordMotionStraightTraverse +=
> > new KM_CoordMotionStraightTraverseHandler(Interpreter_Interpreter_CoordMotionStraightTraverse);
> > KMController.Interpreter.Interpreter_CoordMotionArcFeed +=
> > new KM_CoordMotionArcFeedHandler(Interpreter_Interpreter_CoordMotionArcFeed);
> > KMController.Interpreter.InterpreterCompleted +=
> > new KM_Controller.KM_Interpreter.KM_GCodeInterpreterCompleteHandler(Interpreter_InterpreterCompleted);
> > KMController.Interpreter.InterpreterStatusUpdated +=
> > new KM_Controller.KM_Interpreter.KM_GCodeInterpreterStatusHandler(Interpreter_InterpreterStatusUpdated);
> >
> > KMController.Interpreter.MainPathRoot = @"C:\KMotion428";
> >
> > KMController.Interpreter.CountsPerInchX = StepsPerInchX;
> > KMController.Interpreter.MaxVelX = MaxVelX;
> > KMController.Interpreter.MaxAccelX = AccelX;
> >
> > KMController.Interpreter.CountsPerInchY = StepsPerInchY;
> > KMController.Interpreter.MaxVelY = MaxVelY;
> > KMController.Interpreter.MaxAccelY = AccelY;
> >
> > KMController.Interpreter.CountsPerInchZ = StepsPerInchZ;
> > KMController.Interpreter.MaxVelZ = MaxVelZ;
> > KMController.Interpreter.MaxAccelZ = AccelZ;
> >
> > KMController.Interpreter.CountsPerInchA = StepsPerInchA;
> > KMController.Interpreter.MaxVelA = MaxVelA;
> > KMController.Interpreter.MaxAccelA = AccelA;
> >
> > KMController.Interpreter.BreakAngle = 30;
> >
> > KMController.Interpreter.SetupParams.LengthUnits = KMotion_dotNet.CANON_UNITS.CANON_UNITS_INCHES;
> > KMController.Interpreter.SetupParams.X_AxisOffset = 0.0;
> > KMController.Interpreter.SetupParams.Y_AxisOffset = 0.0;
> > KMController.Interpreter.SetupParams.Z_AxisOffset = 0.0;
> >
> > KMController.Interpreter.SetupParams.BlockDelete = true;
> >
> > KMController.Interpreter.SetupParams.RadiusCompSide = KMotion_dotNet.CANON_SIDE.CANON_SIDE_OFF;
> > KMController.Interpreter.SetupParams.Cycle_R = 0.0;
> > KMController.Interpreter.SetupParams.Cycle_Z = 0.0;
> >
> > KMController.Interpreter.SetupParams.DistanceMode = KMotion_dotNet.DISTANCE_MODE.MODE_ABSOLUTE;
> >
> > KMController.Interpreter.SetupParams.FeedMode = 2;
> >
> > KMController.Interpreter.SetupParams.FloodCoolantOn = false;
> > KMController.Interpreter.SetupParams.MistCoolantOn = false;
> >
> > KMController.Interpreter.SetupParams.CurrentMotionMode = 80;
> >
> > KMController.Interpreter.SetupParams.WorkPlane = KMotion_dotNet.CANON_PLANE.CANON_PLANE_XY;
> >
> > KMController.Interpreter.SetupParams.ToolLengthOffsetIndex = 1;
> > KMController.Interpreter.SetupParams.RadiusComp = 1;
> >
> > KMController.Interpreter.SetupParams.SelectedToolSlot = 1;
> > KMController.Interpreter.SetupParams.TraverseSpeed = 200;
> > KMController.Interpreter.SetupParams.SpindleDirection = KMotion_dotNet.CANON_DIRECTION.CANON_STOPPED;
> > KMController.Interpreter.SetupParams.ToolLengthOffset = 0.0;
> >
> > KMController.Interpreter.SetMcodeAction(3, MCODE_TYPE.M_Action_SetTwoBits, 27, 1, 28, 0, 0, "SpindleCW");
> > KMController.Interpreter.SetMcodeAction(4, MCODE_TYPE.M_Action_SetTwoBits, 27, 0, 28, 1, 0, "SpindleCCW");
> > KMController.Interpreter.SetMcodeAction(5, MCODE_TYPE.M_Action_SetTwoBits, 27, 0, 28, 0, 0, "SpindleOff");
> > KMController.Interpreter.SetMcodeAction(7, MCODE_TYPE.M_Action_Setbit, 3, 1, 0, 0, 0, "MistOn");
> > KMController.Interpreter.SetMcodeAction(8, MCODE_TYPE.M_Action_Setbit, 4, 1, 0, 0, 0, "FloodOn");
> > KMController.Interpreter.SetMcodeAction(9, MCODE_TYPE.M_Action_SetTwoBits, 3, 0, 4, 0, 0, "CoolantOff");
> > KMController.Interpreter.SetMcodeAction(10, MCODE_TYPE.M_Action_Program, 2, 4, 0, 0, 0, @"C:\My KFlop C Programs\KMotionCNC\KMotionCNCSpindlePWM.c");
> > KMController.Interpreter.SetMcodeAction(21, MCODE_TYPE.M_Action_Program, 4, 10, 28, 0, 0, @"C:\My KFlop C Programs\KMotionCNC\KMotionCNCMCodeHandler.c");
> >
> > KMController.Interpreter.InitializeOnExecute = false;
> > KMController.Interpreter.InitializeInterpreter();
> >
> > InterpreterInitialized = true;
> >
> > RunCommand(@"C:\KMotion428\GCode Programs\Init.nc", "G20 F0 S0 G54", true);
> >
> > while (InterpreterIsRunning)
> > ;
> > }
> >
> > Regards,
> > Ray L.
> >
> > --- In DynoMotion@yahoogroups.com, Tom Kerekes <tk@> wrote:
> > >
> > > Hi Ray,
> > > Ãâ
> > > Sounds like a bug.Ãâ Is that from your code?Ãâ Maybe some parameter is not being set?Ãâ You will probably have to step into the code to figure it out.Ãâ Otherwise capture the output motion to see what the really acceleration is.
> > > Ãâ
> > > Which connectors are you using.Ãâ You can multiplex the encoder inputs to JP4 and JP6 if that helps.
> > > Ãâ
> > > Regards
> > > TK
> > >
> > >
> > > ________________________________
> > > From: himykabibble <jagboy@>
> > > To: DynoMotion@yahoogroups.com
> > > Sent: Friday, February 3, 2012 9:14 AM
> > > Subject: [DynoMotion] Re: Can You Verify My Settings?
> > >
> > >
> > > Ãâ
> > > Just a little more data:
> > >
> > > I increased velocity to 200 IPM (67733), acceleration to 35 in/sec^2 (700000), and jerk to 2E12, and I get VERY rare faults when running G0s - perhaps one every few hundred cycles. This is perfectly consistent with what I saw when I first setup the system with Mach3. With the 5X reduced settings in my previous post, I still get CONSTANT faults running G1s, even with the Feedrate specified as only 15 IPM. Why is the response to G1s so radically different from G0s?
> > >
> > > Unfortunately, no easy way to wire encoders in, as I'm using the encoder pins for other things, and I'm not keen on re-wiring just now. But, it seems to me the fact that I can run such aggressive parameters with G0s indicates the servo tuning is not all that far from optimal.
> > >
> > > Regards,
> > > Ray L.
> > >
> > > --- In DynoMotion@yahoogroups.com, "himykabibble" <jagboy@> wrote:
> > > >
> > > > Tom,
> > > >
> > > > I'm stumped here.... If I do:
> > > >
> > > > G00 Z-0.5
> > > > G00 Z0.0
> > > >
> > > > with acceleration at 25in/sec^2, jerk at 20E6, it will run HUNDREDS of cycles, never skipping a beat. I have . But, if I do:
> > > >
> > > > G01 Z-0.5 F150
> > > > G01 Z0.0
> > > >
> > > > even with acceleration reduced by a factor of 5 (to 5in/sec^2), and jerk reduced to 2E5, it faults the servo on EVERY move, and the axis never moves! What is going on here?
> > > >
> > > > This is the same behavior I've been seeing on my knee - where G0s work perfectly, but when I try to jog with the pendant, I can very easily get faults, even at very low speeds. None of the axes on this machine have ever faulted in the past, unless I ran them into an immovable object.
> > > >
> > > > Regards,
> > > > Ray L.
> > > >
> > > > --- In DynoMotion@yahoogroups.com, "himykabibble" <jagboy@> wrote:
> > > > >
> > > > > Tom,
> > > > >
> > > > > The code is the following two lines repeated many time:
> > > > >
> > > > > G01 Z-0.1 F30
> > > > > G00 Z0.0
> > > > >
> > > > > The velocity and acceleration settings are what I've been using ever since I built the machine over 3 years ago. Never a problem. In fact, it's capable of more, it's just too scary to crank things up any higher.
> > > > >
> > > > > Can you explain why KMotionCNC would behave differently from my app? That's the one that really makes no sense to me. I can accept that the servo tuning is not perfect (though it's worked perfectly all these years), but I can't understand why KMotionCNC would not exactly duplicate what my app does, unless the settings in my program are wrong.
> > > > >
> > > > > Regards,
> > > > > Ray L.
> > > > >
> > > > > --- In DynoMotion@yahoogroups.com, Tom Kerekes <tk@> wrote:
> > > > > >
> > > > > > Hi Ray,
> > > > > > ÃÆ'ââ¬Å¡Ãâ
> > > > > > When you say "200ÃÆ'ââ¬Å¡Ãâ IPM rapid back up" I assume youÃÆ'ââ¬Å¡Ãâ didn't mean to say "rapid" as in G0?ÃÆ'ââ¬Å¡Ãâ It would help to just list the G code.
> > > > > > ÃÆ'ââ¬Å¡Ãâ
> > > > > > All we are using here is the Z axis correct?
> > > > > > ÃÆ'ââ¬Å¡Ãâ
> > > > > > Your settings are pretty aggressive with acceleration of 25 in/sec2.ÃÆ'ââ¬Å¡Ãâ I calculate to move 0.1 inches will only take 0.12 seconds with infinite Jerk (what Mach3 always uses).ÃÆ'ââ¬Å¡Ãâ So that explains why "rapids" with KMotionCNC is slower.ÃÆ'ââ¬Å¡Ãâ With Jerk limit it takes about 0.27 seconds.ÃÆ'ââ¬Å¡Ãâ I often just enter the numbers into the Step Response Screen to visually see the profile.
> > > > > > ÃÆ'ââ¬Å¡Ãâ
> > > > > > But I don't understand why feed moves (infinite Jerk) would be different between Mach3 and KMotionCNC.ÃÆ'ââ¬Å¡Ãâ I would capture and plot the data to see which is correct.
> > > > > > ÃÆ'ââ¬Å¡Ãâ
> > > > > > Yes by all means wire the encoder back to KFLOP to be able to plot the servo performance.
> > > > > > ÃÆ'ââ¬Å¡Ãâ
> > > > > > Regards
> > > > > > TKÃÆ'ââ¬Å¡Ãâ
> > > > > >
> > > > > > From: himykabibble <jagboy@>
> > > > > > To: DynoMotion@yahoogroups.com
> > > > > > Sent: Thursday, February 2, 2012 6:12 PM
> > > > > > Subject: [DynoMotion] Can You Verify My Settings?
> > > > > >
> > > > > >
> > > > > > ÃÆ'ââ¬Å¡Ãâ
> > > > > > Tom,
> > > > > >
> > > > > > I tried to actually use my machine with my new app today. The good news is the app did nothing unexpected, and I can tell I will really like the UI once it's a bit more polished. One of the things I added last night was I now output the tool table into my G-code, and the G-code loader in my app now finds it, and pushes it into the interpreter automatically. I will make a tool length database, and hook it into that, so the current tool length settings will be automatically updated each time the program is loaded.
> > > > > >
> > > > > > However, on the first part I tried to cut today, I found it losing position on the quill when doing peck drilling. This always occurred on the up-move. After digging into this a bit, I came up with a simple test program that does a short feed move down at F30, then a 200 IPM rapid back up to the start position. It just does this over, and over, and over. When I run this with my app, I get *constant* faults on the quill servo (something I've never seen in 3 years with this machine). When I run it under KMotionCNC, with what *should* be the same settings, I get occasional faults. When I run it under Mach3 (still with the KFlop), I get no faults.
> > > > > >
> > > > > > Why would I get a different result running my app vs KMotionCNC? Or even Mach3 for that matter? I believe the settings are exactly the same, as follows:
> > > > > >
> > > > > > X/Y Steps/Inch: 20000
> > > > > > X/Y Vel: 200 IPM | 66667 counts/sec
> > > > > > X/Y Accel: 25 in/sec^2 | 500000counts/sec^2
> > > > > > X/Y Jerk: 2E6
> > > > > >
> > > > > > Z Steps/Inch: 20320
> > > > > > Z Vel: 150 IPM/50800 counts/sec
> > > > > > Z Accel: 25 in/sec^2 | 508000 counts/sec*2
> > > > > > Z Jerk: 2E6
> > > > > >
> > > > > > A Steps/Inch: 96000
> > > > > > A Vel: 50 IPM | 80000
> > > > > > A Accel: 5 in/sec^2 | 480000
> > > > > > A Jerk: 2E6
> > > > > >
> > > > > > Any ideas?
> > > > > >
> > > > > > One significant difference I noted between running with Mach3 and running with KMotion - I changed the program to be a 100IPM feed down to -0.1, then a rapid back up to 0.0. If I run this under Mach3, the quill moves up and down VERY quickly, probably making 2-3 cycles/second. Under KMotionCNC and my app, the time to complete each down and up cycle is probably 2-3X what it is in Mach3 - completing no more than one cycle per second.
> > > > > >
> > > > > > Regards,
> > > > > > Ray L.
> > > > > >
> > > > >
> > > >
> > >
> >
>
|
|
Group: DynoMotion |
Message: 3710 |
From: himykabibble |
Date: 2/3/2012 |
Subject: Re: Can You Verify My Settings? |
Doing DefineCoordSystem() in the DSP works correctly. Doing "WriteLine("DefineCS = 3, 2, 1, 0, -1, -1"); through dotNet in the app does absolutely nothing. The board retains whatever setting was already there.
Swapping the Z and A axis channels with DefineCoordsystem did not alter the problem with the Z axis moving in any way. I don't see how those spurious pulses can be anything but a hardware problem. An RTL bug? Whatever it is, seems like it may factor into the explanation the Z axis acceleration problem.
Regards,
Ray L.
--- In DynoMotion@yahoogroups.com, "himykabibble" <jagboy@...> wrote:
>
> Looks like the Gods of Yahoo decided to eat my last message - it never showed up on the forum. I now have two additional problems:
>
> 1) DefineCS does not work. Whether I program it in my init, or do it through KMotions console window, no matter what I set, when I do a "DefineCS" in the console window, it ALWAYS returns "0 1 2 3 -1 -1". Also, the help page on CoordMotion makes reference to the "DefineCS6" command, which I assume doesn't actually exist. I was hoping to swap the Z axis with one of the others, and see if problem #2 below follows....
>
> 2) While working on the acceleration problem, I happened to notice that every time I move the X, Y or A axis, the Z axis moves slightly. After jogging the X axis between 0.0 and 1.0 about a dozen times, the Z axis was about 1/8" higher than it should be. At the start of ANY move on ANY axis, the Z axis moves (ALWAYS up) a few thou. If I go into KMotion and set the Z axis Step pin (IO12) as an input, the problem goes away completely. I got out my scope, and, sure enough, there is a burst of pulses coming out of IO12 at the start of any move, even when my machine is completely disconnected from the KFlop, leaving only the passive breakout board connected. This is not noise - I am seeing fast-fall, fast-rise, full-amplitude, rail-to-rail pulses, perhaps a few dozen or so. The signal is otherwise quite clean. I swapped in my backup KFlop, and I see exactly the same thing.
>
> The hits just keep on comin'....
>
> Regards,
> Ray L.
>
> --- In DynoMotion@yahoogroups.com, brad murry <bradodarb@> wrote:
> >
> > Debugging in 2010 may or may not be the issue. You need to make sure you are in debug config, your application settings in c# need to allow unmanaged debugging and if you want to debug deeper than the interop you will need to set those c++ projects to mixed mode....
> >
> > -Brad Murry
> > ________________________________
> > From: himykabibble
> > Sent: 2/3/2012 12:55 PM
> > To: DynoMotion@yahoogroups.com
> > Subject: [DynoMotion] Re: Can You Verify My Settings?
> >
> > Brad,
> >
> > I've just read back the Interpreter and CoordMotion parameters for all six axes,and they all read back what they should. Where else could this possibly be coming from?
> >
> > I've had no luck getting VS2010 Express to let me debug into the DLLs.
> >
> > Regards,
> > Ray L.
> >
> > --- In DynoMotion@yahoogroups.com, brad murry <bradodarb@> wrote:
> > >
> > > You can check values once you set them, the .net properties do not actually retain data, they merely get and set public members in the c++ code. This means if you set a value and then check it you are reading the values in the underlying libraries. As an added test you can verify values with script commands.
> > >
> > > I have played with accels and velocities and it seems to work for me.
> > >
> > > -Brad Murry
> > > ________________________________
> > > From: Tom Kerekes
> > > Sent: 2/3/2012 12:11 PM
> > > To: DynoMotion@yahoogroups.com
> > > Subject: Re: [DynoMotion] Re: Can You Verify My Settings?
> > >
> > > Hi Ray,
> > >
> > > I don't see anything wrong. Again the simplest thing would just be to use the debugger to check what Aceleration is actually being used in the Trajectory Planner. If it is wrong, work backwards to find the disconnect. That's the nice thing about having all the source code.
> > >
> > > I agree it most likely an issue with the .NET. If you want to post your code I can try to find time to debug it. But I would need everything including the .NET interface you are currently using.
> > >
> > > One other possibility might be the feed rate override being set to infinity or something.
> > >
> > > Regards
> > > TK
> > >
> > >
> > >
> > >
> > >
> > > From: himykabibble <jagboy@>
> > > To: DynoMotion@yahoogroups.com
> > > Sent: Friday, February 3, 2012 10:25 AM
> > > Subject: [DynoMotion] Re: Can You Verify My Settings?
> > >
> > >
> > >
> > > Tom,
> > >
> > > I just tried KMotionCNC again, and it is NOT having this problem, which suggests to me I'm either not doing some essential initialization, or there's a bug in dotNet, and it;s not doing the requested initialization correctly. Both my app and KMotionCNC are using the exact same Init.c, so my init code and dotNet appear to me to be the only variables, as the only other thing my app is doing is passing the G-code file to the interpreter.
> > >
> > > Am I doing the right init? Am I doing it at the right time???
> > >
> > > Kinda smells like the axis parameters are not "taking", since changing acceleration and velocity all over the map makes NO difference in the behavior.
> > >
> > > Below is ALL of the init I'm doing in my app, other than loading the Init.c. This is all done when the first connection is established on app startup. If the connection is lost, only Init.c is re-loaded when the connection comes back.
> > >
> > > private void InitAxes()
> > > {
> > > // Define the axes
> > > KMAxes = new Dictionary<string, KMotion_dotNet.KM_Axis>();
> > > KMAxes.Add("XAxis", new KMotion_dotNet.KM_Axis(KMController, 0, "XAxis"));
> > > KMAxes.Add("YAxis", new KMotion_dotNet.KM_Axis(KMController, 1, "YAxis"));
> > > KMAxes.Add("ZAxis", new KMotion_dotNet.KM_Axis(KMController, 2, "ZAxis"));
> > > KMAxes.Add("AAxis", new KMotion_dotNet.KM_Axis(KMController, 3, "AAxis"));
> > >
> > > KMController.AxisChannels = KMAxes;
> > >
> > > KMController.CoordMotion.Abort();
> > > KMController.CoordMotion.ClearAbort();
> > >
> > > KMController.CoordMotion.MotionParams.CountsPerInchX = StepsPerInchX;
> > > KMController.CoordMotion.MotionParams.MaxVelX = MaxVelX;
> > > KMController.CoordMotion.MotionParams.MaxAccelX = AccelX;
> > > KMController.WriteLine("EnableAxis0");
> > >
> > > KMController.CoordMotion.MotionParams.CountsPerInchY = StepsPerInchY;
> > > KMController.CoordMotion.MotionParams.MaxVelY = MaxVelY;
> > > KMController.CoordMotion.MotionParams.MaxAccelY = AccelY;
> > > KMController.WriteLine("EnableAxis1");
> > >
> > > KMController.CoordMotion.MotionParams.CountsPerInchZ = StepsPerInchZ;
> > > KMController.CoordMotion.MotionParams.MaxVelZ = MaxVelZ;
> > > KMController.CoordMotion.MotionParams.MaxAccelZ = AccelZ;
> > > KMController.WriteLine("EnableAxis2");
> > >
> > > KMController.CoordMotion.MotionParams.CountsPerInchA = StepsPerInchA;
> > > KMController.CoordMotion.MotionParams.MaxVelA = MaxVelA;
> > > KMController.CoordMotion.MotionParams.MaxAccelA = AccelA;
> > > KMController.WriteLine("EnableAxis3");
> > >
> > > KMController.WriteLine("DefineCS = 0 1 2 3 -1 -1");
> > > }
> > >
> > > public void InterpreterInit()
> > > {
> > > KMController.Interpreter.Interpreter_CoordMotionStraightFeed +=
> > > new KM_CoordMotionStraightFeedHandler(Interpreter_Interpreter_CoordMotionStraightFeed);
> > > KMController.Interpreter.Interpreter_CoordMotionStraightTraverse +=
> > > new KM_CoordMotionStraightTraverseHandler(Interpreter_Interpreter_CoordMotionStraightTraverse);
> > > KMController.Interpreter.Interpreter_CoordMotionArcFeed +=
> > > new KM_CoordMotionArcFeedHandler(Interpreter_Interpreter_CoordMotionArcFeed);
> > > KMController.Interpreter.InterpreterCompleted +=
> > > new KM_Controller.KM_Interpreter.KM_GCodeInterpreterCompleteHandler(Interpreter_InterpreterCompleted);
> > > KMController.Interpreter.InterpreterStatusUpdated +=
> > > new KM_Controller.KM_Interpreter.KM_GCodeInterpreterStatusHandler(Interpreter_InterpreterStatusUpdated);
> > >
> > > KMController.Interpreter.MainPathRoot = @"C:\KMotion428";
> > >
> > > KMController.Interpreter.CountsPerInchX = StepsPerInchX;
> > > KMController.Interpreter.MaxVelX = MaxVelX;
> > > KMController.Interpreter.MaxAccelX = AccelX;
> > >
> > > KMController.Interpreter.CountsPerInchY = StepsPerInchY;
> > > KMController.Interpreter.MaxVelY = MaxVelY;
> > > KMController.Interpreter.MaxAccelY = AccelY;
> > >
> > > KMController.Interpreter.CountsPerInchZ = StepsPerInchZ;
> > > KMController.Interpreter.MaxVelZ = MaxVelZ;
> > > KMController.Interpreter.MaxAccelZ = AccelZ;
> > >
> > > KMController.Interpreter.CountsPerInchA = StepsPerInchA;
> > > KMController.Interpreter.MaxVelA = MaxVelA;
> > > KMController.Interpreter.MaxAccelA = AccelA;
> > >
> > > KMController.Interpreter.BreakAngle = 30;
> > >
> > > KMController.Interpreter.SetupParams.LengthUnits = KMotion_dotNet.CANON_UNITS.CANON_UNITS_INCHES;
> > > KMController.Interpreter.SetupParams.X_AxisOffset = 0.0;
> > > KMController.Interpreter.SetupParams.Y_AxisOffset = 0.0;
> > > KMController.Interpreter.SetupParams.Z_AxisOffset = 0.0;
> > >
> > > KMController.Interpreter.SetupParams.BlockDelete = true;
> > >
> > > KMController.Interpreter.SetupParams.RadiusCompSide = KMotion_dotNet.CANON_SIDE.CANON_SIDE_OFF;
> > > KMController.Interpreter.SetupParams.Cycle_R = 0.0;
> > > KMController.Interpreter.SetupParams.Cycle_Z = 0.0;
> > >
> > > KMController.Interpreter.SetupParams.DistanceMode = KMotion_dotNet.DISTANCE_MODE.MODE_ABSOLUTE;
> > >
> > > KMController.Interpreter.SetupParams.FeedMode = 2;
> > >
> > > KMController.Interpreter.SetupParams.FloodCoolantOn = false;
> > > KMController.Interpreter.SetupParams.MistCoolantOn = false;
> > >
> > > KMController.Interpreter.SetupParams.CurrentMotionMode = 80;
> > >
> > > KMController.Interpreter.SetupParams.WorkPlane = KMotion_dotNet.CANON_PLANE.CANON_PLANE_XY;
> > >
> > > KMController.Interpreter.SetupParams.ToolLengthOffsetIndex = 1;
> > > KMController.Interpreter.SetupParams.RadiusComp = 1;
> > >
> > > KMController.Interpreter.SetupParams.SelectedToolSlot = 1;
> > > KMController.Interpreter.SetupParams.TraverseSpeed = 200;
> > > KMController.Interpreter.SetupParams.SpindleDirection = KMotion_dotNet.CANON_DIRECTION.CANON_STOPPED;
> > > KMController.Interpreter.SetupParams.ToolLengthOffset = 0.0;
> > >
> > > KMController.Interpreter.SetMcodeAction(3, MCODE_TYPE.M_Action_SetTwoBits, 27, 1, 28, 0, 0, "SpindleCW");
> > > KMController.Interpreter.SetMcodeAction(4, MCODE_TYPE.M_Action_SetTwoBits, 27, 0, 28, 1, 0, "SpindleCCW");
> > > KMController.Interpreter.SetMcodeAction(5, MCODE_TYPE.M_Action_SetTwoBits, 27, 0, 28, 0, 0, "SpindleOff");
> > > KMController.Interpreter.SetMcodeAction(7, MCODE_TYPE.M_Action_Setbit, 3, 1, 0, 0, 0, "MistOn");
> > > KMController.Interpreter.SetMcodeAction(8, MCODE_TYPE.M_Action_Setbit, 4, 1, 0, 0, 0, "FloodOn");
> > > KMController.Interpreter.SetMcodeAction(9, MCODE_TYPE.M_Action_SetTwoBits, 3, 0, 4, 0, 0, "CoolantOff");
> > > KMController.Interpreter.SetMcodeAction(10, MCODE_TYPE.M_Action_Program, 2, 4, 0, 0, 0, @"C:\My KFlop C Programs\KMotionCNC\KMotionCNCSpindlePWM.c");
> > > KMController.Interpreter.SetMcodeAction(21, MCODE_TYPE.M_Action_Program, 4, 10, 28, 0, 0, @"C:\My KFlop C Programs\KMotionCNC\KMotionCNCMCodeHandler.c");
> > >
> > > KMController.Interpreter.InitializeOnExecute = false;
> > > KMController.Interpreter.InitializeInterpreter();
> > >
> > > InterpreterInitialized = true;
> > >
> > > RunCommand(@"C:\KMotion428\GCode Programs\Init.nc", "G20 F0 S0 G54", true);
> > >
> > > while (InterpreterIsRunning)
> > > ;
> > > }
> > >
> > > Regards,
> > > Ray L.
> > >
> > > --- In DynoMotion@yahoogroups.com, Tom Kerekes <tk@> wrote:
> > > >
> > > > Hi Ray,
> > > > Ãâ
> > > > Sounds like a bug.Ãâ Is that from your code?Ãâ Maybe some parameter is not being set?Ãâ You will probably have to step into the code to figure it out.Ãâ Otherwise capture the output motion to see what the really acceleration is.
> > > > Ãâ
> > > > Which connectors are you using.Ãâ You can multiplex the encoder inputs to JP4 and JP6 if that helps.
> > > > Ãâ
> > > > Regards
> > > > TK
> > > >
> > > >
> > > > ________________________________
> > > > From: himykabibble <jagboy@>
> > > > To: DynoMotion@yahoogroups.com
> > > > Sent: Friday, February 3, 2012 9:14 AM
> > > > Subject: [DynoMotion] Re: Can You Verify My Settings?
> > > >
> > > >
> > > > Ãâ
> > > > Just a little more data:
> > > >
> > > > I increased velocity to 200 IPM (67733), acceleration to 35 in/sec^2 (700000), and jerk to 2E12, and I get VERY rare faults when running G0s - perhaps one every few hundred cycles. This is perfectly consistent with what I saw when I first setup the system with Mach3. With the 5X reduced settings in my previous post, I still get CONSTANT faults running G1s, even with the Feedrate specified as only 15 IPM. Why is the response to G1s so radically different from G0s?
> > > >
> > > > Unfortunately, no easy way to wire encoders in, as I'm using the encoder pins for other things, and I'm not keen on re-wiring just now. But, it seems to me the fact that I can run such aggressive parameters with G0s indicates the servo tuning is not all that far from optimal.
> > > >
> > > > Regards,
> > > > Ray L.
> > > >
> > > > --- In DynoMotion@yahoogroups.com, "himykabibble" <jagboy@> wrote:
> > > > >
> > > > > Tom,
> > > > >
> > > > > I'm stumped here.... If I do:
> > > > >
> > > > > G00 Z-0.5
> > > > > G00 Z0.0
> > > > >
> > > > > with acceleration at 25in/sec^2, jerk at 20E6, it will run HUNDREDS of cycles, never skipping a beat. I have . But, if I do:
> > > > >
> > > > > G01 Z-0.5 F150
> > > > > G01 Z0.0
> > > > >
> > > > > even with acceleration reduced by a factor of 5 (to 5in/sec^2), and jerk reduced to 2E5, it faults the servo on EVERY move, and the axis never moves! What is going on here?
> > > > >
> > > > > This is the same behavior I've been seeing on my knee - where G0s work perfectly, but when I try to jog with the pendant, I can very easily get faults, even at very low speeds. None of the axes on this machine have ever faulted in the past, unless I ran them into an immovable object.
> > > > >
> > > > > Regards,
> > > > > Ray L.
> > > > >
> > > > > --- In DynoMotion@yahoogroups.com, "himykabibble" <jagboy@> wrote:
> > > > > >
> > > > > > Tom,
> > > > > >
> > > > > > The code is the following two lines repeated many time:
> > > > > >
> > > > > > G01 Z-0.1 F30
> > > > > > G00 Z0.0
> > > > > >
> > > > > > The velocity and acceleration settings are what I've been using ever since I built the machine over 3 years ago. Never a problem. In fact, it's capable of more, it's just too scary to crank things up any higher.
> > > > > >
> > > > > > Can you explain why KMotionCNC would behave differently from my app? That's the one that really makes no sense to me. I can accept that the servo tuning is not perfect (though it's worked perfectly all these years), but I can't understand why KMotionCNC would not exactly duplicate what my app does, unless the settings in my program are wrong.
> > > > > >
> > > > > > Regards,
> > > > > > Ray L.
> > > > > >
> > > > > > --- In DynoMotion@yahoogroups.com, Tom Kerekes <tk@> wrote:
> > > > > > >
> > > > > > > Hi Ray,
> > > > > > > ÃÆ'ââ¬Å¡Ãâ
> > > > > > > When you say "200ÃÆ'ââ¬Å¡Ãâ IPM rapid back up" I assume youÃÆ'ââ¬Å¡Ãâ didn't mean to say "rapid" as in G0?ÃÆ'ââ¬Å¡Ãâ It would help to just list the G code.
> > > > > > > ÃÆ'ââ¬Å¡Ãâ
> > > > > > > All we are using here is the Z axis correct?
> > > > > > > ÃÆ'ââ¬Å¡Ãâ
> > > > > > > Your settings are pretty aggressive with acceleration of 25 in/sec2.ÃÆ'ââ¬Å¡Ãâ I calculate to move 0.1 inches will only take 0.12 seconds with infinite Jerk (what Mach3 always uses).ÃÆ'ââ¬Å¡Ãâ So that explains why "rapids" with KMotionCNC is slower.ÃÆ'ââ¬Å¡Ãâ With Jerk limit it takes about 0.27 seconds.ÃÆ'ââ¬Å¡Ãâ I often just enter the numbers into the Step Response Screen to visually see the profile.
> > > > > > > ÃÆ'ââ¬Å¡Ãâ
> > > > > > > But I don't understand why feed moves (infinite Jerk) would be different between Mach3 and KMotionCNC.ÃÆ'ââ¬Å¡Ãâ I would capture and plot the data to see which is correct.
> > > > > > > ÃÆ'ââ¬Å¡Ãâ
> > > > > > > Yes by all means wire the encoder back to KFLOP to be able to plot the servo performance.
> > > > > > > ÃÆ'ââ¬Å¡Ãâ
> > > > > > > Regards
> > > > > > > TKÃÆ'ââ¬Å¡Ãâ
> > > > > > >
> > > > > > > From: himykabibble <jagboy@>
> > > > > > > To: DynoMotion@yahoogroups.com
> > > > > > > Sent: Thursday, February 2, 2012 6:12 PM
> > > > > > > Subject: [DynoMotion] Can You Verify My Settings?
> > > > > > >
> > > > > > >
> > > > > > > ÃÆ'ââ¬Å¡Ãâ
> > > > > > > Tom,
> > > > > > >
> > > > > > > I tried to actually use my machine with my new app today. The good news is the app did nothing unexpected, and I can tell I will really like the UI once it's a bit more polished. One of the things I added last night was I now output the tool table into my G-code, and the G-code loader in my app now finds it, and pushes it into the interpreter automatically. I will make a tool length database, and hook it into that, so the current tool length settings will be automatically updated each time the program is loaded.
> > > > > > >
> > > > > > > However, on the first part I tried to cut today, I found it losing position on the quill when doing peck drilling. This always occurred on the up-move. After digging into this a bit, I came up with a simple test program that does a short feed move down at F30, then a 200 IPM rapid back up to the start position. It just does this over, and over, and over. When I run this with my app, I get *constant* faults on the quill servo (something I've never seen in 3 years with this machine). When I run it under KMotionCNC, with what *should* be the same settings, I get occasional faults. When I run it under Mach3 (still with the KFlop), I get no faults.
> > > > > > >
> > > > > > > Why would I get a different result running my app vs KMotionCNC? Or even Mach3 for that matter? I believe the settings are exactly the same, as follows:
> > > > > > >
> > > > > > > X/Y Steps/Inch: 20000
> > > > > > > X/Y Vel: 200 IPM | 66667 counts/sec
> > > > > > > X/Y Accel: 25 in/sec^2 | 500000counts/sec^2
> > > > > > > X/Y Jerk: 2E6
> > > > > > >
> > > > > > > Z Steps/Inch: 20320
> > > > > > > Z Vel: 150 IPM/50800 counts/sec
> > > > > > > Z Accel: 25 in/sec^2 | 508000 counts/sec*2
> > > > > > > Z Jerk: 2E6
> > > > > > >
> > > > > > > A Steps/Inch: 96000
> > > > > > > A Vel: 50 IPM | 80000
> > > > > > > A Accel: 5 in/sec^2 | 480000
> > > > > > > A Jerk: 2E6
> > > > > > >
> > > > > > > Any ideas?
> > > > > > >
> > > > > > > One significant difference I noted between running with Mach3 and running with KMotion - I changed the program to be a 100IPM feed down to -0.1, then a rapid back up to 0.0. If I run this under Mach3, the quill moves up and down VERY quickly, probably making 2-3 cycles/second. Under KMotionCNC and my app, the time to complete each down and up cycle is probably 2-3X what it is in Mach3 - completing no more than one cycle per second.
> > > > > > >
> > > > > > > Regards,
> > > > > > > Ray L.
> > > > > > >
> > > > > >
> > > > >
> > > >
> > >
> >
>
|
|
Group: DynoMotion |
Message: 3712 |
From: Tom Kerekes |
Date: 2/3/2012 |
Subject: Re: Can You Verify My Settings? |
Hi Ray,
The DefineCS requires spaces not commas as parameter separators. KFLOP responds with an error message which normally causes the communication to get out of sync and a disconnect. Not sure why it isn't detecting something wrong under .NET.
Don't know about the weird Z pulses. Do you get them with your DSP programs disabled?
TK
Group: DynoMotion |
Message: 3713 |
From: himykabibble |
Date: 2/3/2012 |
Subject: Re: Can You Verify My Settings? |
Tom,
I have no DSP programs running.... I only run init.c, which does its thing then exits.
Regards,
Ray L.
--- In DynoMotion@yahoogroups.com, Tom Kerekes <tk@...> wrote:
>
> Hi Ray,
> Â
> The DefineCS requires spaces not commas as parameter separators. KFLOP responds with an error message which normally causes the communication to get out of sync and a disconnect. Not sure why it isn't detecting something wrong under .NET.
> Â
> Don't know about the weird Z pulses. Do you get them with your DSP programs disabled?
> Â
> TK
> Â
> Â
>
> From: himykabibble <jagboy@...>
> To: DynoMotion@yahoogroups.com
> Sent: Friday, February 3, 2012 3:15 PM
> Subject: [DynoMotion] Re: Can You Verify My Settings?
>
>
> Â
> Doing DefineCoordSystem() in the DSP works correctly. Doing "WriteLine("DefineCS = 3, 2, 1, 0, -1, -1"); through dotNet in the app does absolutely nothing. The board retains whatever setting was already there.
>
> Swapping the Z and A axis channels with DefineCoordsystem did not alter the problem with the Z axis moving in any way. I don't see how those spurious pulses can be anything but a hardware problem. An RTL bug? Whatever it is, seems like it may factor into the explanation the Z axis acceleration problem.
>
> Regards,
> Ray L.
>
> --- In DynoMotion@yahoogroups.com, "himykabibble" <jagboy@> wrote:
> >
> > Looks like the Gods of Yahoo decided to eat my last message - it never showed up on the forum. I now have two additional problems:
> >
> > 1) DefineCS does not work. Whether I program it in my init, or do it through KMotions console window, no matter what I set, when I do a "DefineCS" in the console window, it ALWAYS returns "0 1 2 3 -1 -1". Also, the help page on CoordMotion makes reference to the "DefineCS6" command, which I assume doesn't actually exist. I was hoping to swap the Z axis with one of the others, and see if problem #2 below follows....
> >
> > 2) While working on the acceleration problem, I happened to notice that every time I move the X, Y or A axis, the Z axis moves slightly. After jogging the X axis between 0.0 and 1.0 about a dozen times, the Z axis was about 1/8" higher than it should be. At the start of ANY move on ANY axis, the Z axis moves (ALWAYS up) a few thou. If I go into KMotion and set the Z axis Step pin (IO12) as an input, the problem goes away completely. I got out my scope, and, sure enough, there is a burst of pulses coming out of IO12 at the start of any move, even when my machine is completely disconnected from the KFlop, leaving only the passive breakout board connected. This is not noise - I am seeing fast-fall, fast-rise, full-amplitude, rail-to-rail pulses, perhaps a few dozen or so. The signal is otherwise quite clean. I swapped in my backup KFlop, and I see exactly the same thing.
> >
> > The hits just keep on comin'....
> >
> > Regards,
> > Ray L.
> >
> > --- In DynoMotion@yahoogroups.com, brad murry <bradodarb@> wrote:
> > >
> > > Debugging in 2010 may or may not be the issue. You need to make sure you are in debug config, your application settings in c# need to allow unmanaged debugging and if you want to debug deeper than the interop you will need to set those c++ projects to mixed mode....
> > >
> > > -Brad Murry
> > > ________________________________
> > > From: himykabibble
> > > Sent: 2/3/2012 12:55 PM
> > > To: DynoMotion@yahoogroups.com
> > > Subject: [DynoMotion] Re: Can You Verify My Settings?
> > >
> > > Brad,
> > >
> > > I've just read back the Interpreter and CoordMotion parameters for all six axes,and they all read back what they should. Where else could this possibly be coming from?
> > >
> > > I've had no luck getting VS2010 Express to let me debug into the DLLs.
> > >
> > > Regards,
> > > Ray L.
> > >
> > > --- In DynoMotion@yahoogroups.com, brad murry <bradodarb@> wrote:
> > > >
> > > > You can check values once you set them, the .net properties do not actually retain data, they merely get and set public members in the c++ code. This means if you set a value and then check it you are reading the values in the underlying libraries. As an added test you can verify values with script commands.
> > > >
> > > > I have played with accels and velocities and it seems to work for me.
> > > >
> > > > -Brad Murry
> > > > ________________________________
> > > > From: Tom Kerekes
> > > > Sent: 2/3/2012 12:11 PM
> > > > To: DynoMotion@yahoogroups.com
> > > > Subject: Re: [DynoMotion] Re: Can You Verify My Settings?
> > > >
> > > > Hi Ray,
> > > >
> > > > I don't see anything wrong. Again the simplest thing would just be to use the debugger to check what Aceleration is actually being used in the Trajectory Planner. If it is wrong, work backwards to find the disconnect. That's the nice thing about having all the source code.
> > > >
> > > > I agree it most likely an issue with the .NET. If you want to post your code I can try to find time to debug it. But I would need everything including the .NET interface you are currently using.
> > > >
> > > > One other possibility might be the feed rate override being set to infinity or something.
> > > >
> > > > Regards
> > > > TK
> > > >
> > > >
> > > >
> > > >
> > > >
> > > > From: himykabibble <jagboy@>
> > > > To: DynoMotion@yahoogroups.com
> > > > Sent: Friday, February 3, 2012 10:25 AM
> > > > Subject: [DynoMotion] Re: Can You Verify My Settings?
> > > >
> > > >
> > > >
> > > > Tom,
> > > >
> > > > I just tried KMotionCNC again, and it is NOT having this problem, which suggests to me I'm either not doing some essential initialization, or there's a bug in dotNet, and it;s not doing the requested initialization correctly. Both my app and KMotionCNC are using the exact same Init.c, so my init code and dotNet appear to me to be the only variables, as the only other thing my app is doing is passing the G-code file to the interpreter.
> > > >
> > > > Am I doing the right init? Am I doing it at the right time???
> > > >
> > > > Kinda smells like the axis parameters are not "taking", since changing acceleration and velocity all over the map makes NO difference in the behavior.
> > > >
> > > > Below is ALL of the init I'm doing in my app, other than loading the Init.c. This is all done when the first connection is established on app startup. If the connection is lost, only Init.c is re-loaded when the connection comes back.
> > > >
> > > > private void InitAxes()
> > > > {
> > > > // Define the axes
> > > > KMAxes = new Dictionary<string, KMotion_dotNet.KM_Axis>();
> > > > KMAxes.Add("XAxis", new KMotion_dotNet.KM_Axis(KMController, 0, "XAxis"));
> > > > KMAxes.Add("YAxis", new KMotion_dotNet.KM_Axis(KMController, 1, "YAxis"));
> > > > KMAxes.Add("ZAxis", new KMotion_dotNet.KM_Axis(KMController, 2, "ZAxis"));
> > > > KMAxes.Add("AAxis", new KMotion_dotNet.KM_Axis(KMController, 3, "AAxis"));
> > > >
> > > > KMController.AxisChannels = KMAxes;
> > > >
> > > > KMController.CoordMotion.Abort();
> > > > KMController.CoordMotion.ClearAbort();
> > > >
> > > > KMController.CoordMotion.MotionParams.CountsPerInchX = StepsPerInchX;
> > > > KMController.CoordMotion.MotionParams.MaxVelX = MaxVelX;
> > > > KMController.CoordMotion.MotionParams.MaxAccelX = AccelX;
> > > > KMController.WriteLine("EnableAxis0");
> > > >
> > > > KMController.CoordMotion.MotionParams.CountsPerInchY = StepsPerInchY;
> > > > KMController.CoordMotion.MotionParams.MaxVelY = MaxVelY;
> > > > KMController.CoordMotion.MotionParams.MaxAccelY = AccelY;
> > > > KMController.WriteLine("EnableAxis1");
> > > >
> > > > KMController.CoordMotion.MotionParams.CountsPerInchZ = StepsPerInchZ;
> > > > KMController.CoordMotion.MotionParams.MaxVelZ = MaxVelZ;
> > > > KMController.CoordMotion.MotionParams.MaxAccelZ = AccelZ;
> > > > KMController.WriteLine("EnableAxis2");
> > > >
> > > > KMController.CoordMotion.MotionParams.CountsPerInchA = StepsPerInchA;
> > > > KMController.CoordMotion.MotionParams.MaxVelA = MaxVelA;
> > > > KMController.CoordMotion.MotionParams.MaxAccelA = AccelA;
> > > > KMController.WriteLine("EnableAxis3");
> > > >
> > > > KMController.WriteLine("DefineCS = 0 1 2 3 -1 -1");
> > > > }
> > > >
> > > > public void InterpreterInit()
> > > > {
> > > > KMController.Interpreter.Interpreter_CoordMotionStraightFeed +=
> > > > new KM_CoordMotionStraightFeedHandler(Interpreter_Interpreter_CoordMotionStraightFeed);
> > > > KMController.Interpreter.Interpreter_CoordMotionStraightTraverse +=
> > > > new KM_CoordMotionStraightTraverseHandler(Interpreter_Interpreter_CoordMotionStraightTraverse);
> > > > KMController.Interpreter.Interpreter_CoordMotionArcFeed +=
> > > > new KM_CoordMotionArcFeedHandler(Interpreter_Interpreter_CoordMotionArcFeed);
> > > > KMController.Interpreter.InterpreterCompleted +=
> > > > new KM_Controller.KM_Interpreter.KM_GCodeInterpreterCompleteHandler(Interpreter_InterpreterCompleted);
> > > > KMController.Interpreter.InterpreterStatusUpdated +=
> > > > new KM_Controller.KM_Interpreter.KM_GCodeInterpreterStatusHandler(Interpreter_InterpreterStatusUpdated);
> > > >
> > > > KMController.Interpreter.MainPathRoot = @"C:\KMotion428";
> > > >
> > > > KMController.Interpreter.CountsPerInchX = StepsPerInchX;
> > > > KMController.Interpreter.MaxVelX = MaxVelX;
> > > > KMController.Interpreter.MaxAccelX = AccelX;
> > > >
> > > > KMController.Interpreter.CountsPerInchY = StepsPerInchY;
> > > > KMController.Interpreter.MaxVelY = MaxVelY;
> > > > KMController.Interpreter.MaxAccelY = AccelY;
> > > >
> > > > KMController.Interpreter.CountsPerInchZ = StepsPerInchZ;
> > > > KMController.Interpreter.MaxVelZ = MaxVelZ;
> > > > KMController.Interpreter.MaxAccelZ = AccelZ;
> > > >
> > > > KMController.Interpreter.CountsPerInchA = StepsPerInchA;
> > > > KMController.Interpreter.MaxVelA = MaxVelA;
> > > > KMController.Interpreter.MaxAccelA = AccelA;
> > > >
> > > > KMController.Interpreter.BreakAngle = 30;
> > > >
> > > > KMController.Interpreter.SetupParams.LengthUnits = KMotion_dotNet.CANON_UNITS.CANON_UNITS_INCHES;
> > > > KMController.Interpreter.SetupParams.X_AxisOffset = 0.0;
> > > > KMController.Interpreter.SetupParams.Y_AxisOffset = 0.0;
> > > > KMController.Interpreter.SetupParams.Z_AxisOffset = 0.0;
> > > >
> > > > KMController.Interpreter.SetupParams.BlockDelete = true;
> > > >
> > > > KMController.Interpreter.SetupParams.RadiusCompSide = KMotion_dotNet.CANON_SIDE.CANON_SIDE_OFF;
> > > > KMController.Interpreter.SetupParams.Cycle_R = 0.0;
> > > > KMController.Interpreter.SetupParams.Cycle_Z = 0.0;
> > > >
> > > > KMController.Interpreter.SetupParams.DistanceMode = KMotion_dotNet.DISTANCE_MODE.MODE_ABSOLUTE;
> > > >
> > > > KMController.Interpreter.SetupParams.FeedMode = 2;
> > > >
> > > > KMController.Interpreter.SetupParams.FloodCoolantOn = false;
> > > > KMController.Interpreter.SetupParams.MistCoolantOn = false;
> > > >
> > > > KMController.Interpreter.SetupParams.CurrentMotionMode = 80;
> > > >
> > > > KMController.Interpreter.SetupParams.WorkPlane = KMotion_dotNet.CANON_PLANE.CANON_PLANE_XY;
> > > >
> > > > KMController.Interpreter.SetupParams.ToolLengthOffsetIndex = 1;
> > > > KMController.Interpreter.SetupParams.RadiusComp = 1;
> > > >
> > > > KMController.Interpreter.SetupParams.SelectedToolSlot = 1;
> > > > KMController.Interpreter.SetupParams.TraverseSpeed = 200;
> > > > KMController.Interpreter.SetupParams.SpindleDirection = KMotion_dotNet.CANON_DIRECTION.CANON_STOPPED;
> > > > KMController.Interpreter.SetupParams.ToolLengthOffset = 0.0;
> > > >
> > > > KMController.Interpreter.SetMcodeAction(3, MCODE_TYPE.M_Action_SetTwoBits, 27, 1, 28, 0, 0, "SpindleCW");
> > > > KMController.Interpreter.SetMcodeAction(4, MCODE_TYPE.M_Action_SetTwoBits, 27, 0, 28, 1, 0, "SpindleCCW");
> > > > KMController.Interpreter.SetMcodeAction(5, MCODE_TYPE.M_Action_SetTwoBits, 27, 0, 28, 0, 0, "SpindleOff");
> > > > KMController.Interpreter.SetMcodeAction(7, MCODE_TYPE.M_Action_Setbit, 3, 1, 0, 0, 0, "MistOn");
> > > > KMController.Interpreter.SetMcodeAction(8, MCODE_TYPE.M_Action_Setbit, 4, 1, 0, 0, 0, "FloodOn");
> > > > KMController.Interpreter.SetMcodeAction(9, MCODE_TYPE.M_Action_SetTwoBits, 3, 0, 4, 0, 0, "CoolantOff");
> > > > KMController.Interpreter.SetMcodeAction(10, MCODE_TYPE.M_Action_Program, 2, 4, 0, 0, 0, @"C:\My KFlop C Programs\KMotionCNC\KMotionCNCSpindlePWM.c");
> > > > KMController.Interpreter.SetMcodeAction(21, MCODE_TYPE.M_Action_Program, 4, 10, 28, 0, 0, @"C:\My KFlop C Programs\KMotionCNC\KMotionCNCMCodeHandler.c");
> > > >
> > > > KMController.Interpreter.InitializeOnExecute = false;
> > > > KMController.Interpreter.InitializeInterpreter();
> > > >
> > > > InterpreterInitialized = true;
> > > >
> > > > RunCommand(@"C:\KMotion428\GCode Programs\Init.nc", "G20 F0 S0 G54", true);
> > > >
> > > > while (InterpreterIsRunning)
> > > > ;
> > > > }
> > > >
> > > > Regards,
> > > > Ray L.
> > > >
> > > > --- In DynoMotion@yahoogroups.com, Tom Kerekes <tk@> wrote:
> > > > >
> > > > > Hi Ray,
> > > > > ÃÆ'ââ¬Å¡
> > > > > Sounds like a bug.ÃÆ'ââ¬Å¡ Is that from your code?ÃÆ'ââ¬Å¡ Maybe some parameter is not being set?ÃÆ'ââ¬Å¡ You will probably have to step into the code to figure it out.ÃÆ'ââ¬Å¡ Otherwise capture the output motion to see what the really acceleration is.
> > > > > ÃÆ'ââ¬Å¡
> > > > > Which connectors are you using.ÃÆ'ââ¬Å¡ You can multiplex the encoder inputs to JP4 and JP6 if that helps.
> > > > > ÃÆ'ââ¬Å¡
> > > > > Regards
> > > > > TK
> > > > >
> > > > >
> > > > > ________________________________
> > > > > From: himykabibble <jagboy@>
> > > > > To: DynoMotion@yahoogroups.com
> > > > > Sent: Friday, February 3, 2012 9:14 AM
> > > > > Subject: [DynoMotion] Re: Can You Verify My Settings?
> > > > >
> > > > >
> > > > > ÃÆ'ââ¬Å¡
> > > > > Just a little more data:
> > > > >
> > > > > I increased velocity to 200 IPM (67733), acceleration to 35 in/sec^2 (700000), and jerk to 2E12, and I get VERY rare faults when running G0s - perhaps one every few hundred cycles. This is perfectly consistent with what I saw when I first setup the system with Mach3. With the 5X reduced settings in my previous post, I still get CONSTANT faults running G1s, even with the Feedrate specified as only 15 IPM. Why is the response to G1s so radically different from G0s?
> > > > >
> > > > > Unfortunately, no easy way to wire encoders in, as I'm using the encoder pins for other things, and I'm not keen on re-wiring just now. But, it seems to me the fact that I can run such aggressive parameters with G0s indicates the servo tuning is not all that far from optimal.
> > > > >
> > > > > Regards,
> > > > > Ray L.
> > > > >
> > > > > --- In DynoMotion@yahoogroups.com, "himykabibble" <jagboy@> wrote:
> > > > > >
> > > > > > Tom,
> > > > > >
> > > > > > I'm stumped here.... If I do:
> > > > > >
> > > > > > G00 Z-0.5
> > > > > > G00 Z0.0
> > > > > >
> > > > > > with acceleration at 25in/sec^2, jerk at 20E6, it will run HUNDREDS of cycles, never skipping a beat. I have . But, if I do:
> > > > > >
> > > > > > G01 Z-0.5 F150
> > > > > > G01 Z0.0
> > > > > >
> > > > > > even with acceleration reduced by a factor of 5 (to 5in/sec^2), and jerk reduced to 2E5, it faults the servo on EVERY move, and the axis never moves! What is going on here?
> > > > > >
> > > > > > This is the same behavior I've been seeing on my knee - where G0s work perfectly, but when I try to jog with the pendant, I can very easily get faults, even at very low speeds. None of the axes on this machine have ever faulted in the past, unless I ran them into an immovable object.
> > > > > >
> > > > > > Regards,
> > > > > > Ray L.
> > > > > >
> > > > > > --- In DynoMotion@yahoogroups.com, "himykabibble" <jagboy@> wrote:
> > > > > > >
> > > > > > > Tom,
> > > > > > >
> > > > > > > The code is the following two lines repeated many time:
> > > > > > >
> > > > > > > G01 Z-0.1 F30
> > > > > > > G00 Z0.0
> > > > > > >
> > > > > > > The velocity and acceleration settings are what I've been using ever since I built the machine over 3 years ago. Never a problem. In fact, it's capable of more, it's just too scary to crank things up any higher.
> > > > > > >
> > > > > > > Can you explain why KMotionCNC would behave differently from my app? That's the one that really makes no sense to me. I can accept that the servo tuning is not perfect (though it's worked perfectly all these years), but I can't understand why KMotionCNC would not exactly duplicate what my app does, unless the settings in my program are wrong.
> > > > > > >
> > > > > > > Regards,
> > > > > > > Ray L.
> > > > > > >
> > > > > > > --- In DynoMotion@yahoogroups.com, Tom Kerekes <tk@> wrote:
> > > > > > > >
> > > > > > > > Hi Ray,
> > > > > > > > ÃÆ'Ã'âââ¬Ã
¡ÃÆ'ââ¬Å¡
> > > > > > > > When you say "200ÃÆ'Ã'âââ¬Ã
¡ÃÆ'ââ¬Å¡ IPM rapid back up" I assume youÃÆ'Ã'âââ¬Ã
¡ÃÆ'ââ¬Å¡ didn't mean to say "rapid" as in G0?ÃÆ'Ã'âââ¬Ã
¡ÃÆ'ââ¬Å¡ It would help to just list the G code.
> > > > > > > > ÃÆ'Ã'âââ¬Ã
¡ÃÆ'ââ¬Å¡
> > > > > > > > All we are using here is the Z axis correct?
> > > > > > > > ÃÆ'Ã'âââ¬Ã
¡ÃÆ'ââ¬Å¡
> > > > > > > > Your settings are pretty aggressive with acceleration of 25 in/sec2.ÃÆ'Ã'âââ¬Ã
¡ÃÆ'ââ¬Å¡ I calculate to move 0.1 inches will only take 0.12 seconds with infinite Jerk (what Mach3 always uses).ÃÆ'Ã'âââ¬Ã
¡ÃÆ'ââ¬Å¡ So that explains why "rapids" with KMotionCNC is slower.ÃÆ'Ã'âââ¬Ã
¡ÃÆ'ââ¬Å¡ With Jerk limit it takes about 0.27 seconds.ÃÆ'Ã'âââ¬Ã
¡ÃÆ'ââ¬Å¡ I often just enter the numbers into the Step Response Screen to visually see the profile.
> > > > > > > > ÃÆ'Ã'âââ¬Ã
¡ÃÆ'ââ¬Å¡
> > > > > > > > But I don't understand why feed moves (infinite Jerk) would be different between Mach3 and KMotionCNC.ÃÆ'Ã'âââ¬Ã
¡ÃÆ'ââ¬Å¡ I would capture and plot the data to see which is correct.
> > > > > > > > ÃÆ'Ã'âââ¬Ã
¡ÃÆ'ââ¬Å¡
> > > > > > > > Yes by all means wire the encoder back to KFLOP to be able to plot the servo performance.
> > > > > > > > ÃÆ'Ã'âââ¬Ã
¡ÃÆ'ââ¬Å¡
> > > > > > > > Regards
> > > > > > > > TKÃÆ'Ã'âââ¬Ã
¡ÃÆ'ââ¬Å¡
> > > > > > > >
> > > > > > > > From: himykabibble <jagboy@>
> > > > > > > > To: DynoMotion@yahoogroups.com
> > > > > > > > Sent: Thursday, February 2, 2012 6:12 PM
> > > > > > > > Subject: [DynoMotion] Can You Verify My Settings?
> > > > > > > >
> > > > > > > >
> > > > > > > > ÃÆ'Ã'âââ¬Ã
¡ÃÆ'ââ¬Å¡
> > > > > > > > Tom,
> > > > > > > >
> > > > > > > > I tried to actually use my machine with my new app today. The good news is the app did nothing unexpected, and I can tell I will really like the UI once it's a bit more polished. One of the things I added last night was I now output the tool table into my G-code, and the G-code loader in my app now finds it, and pushes it into the interpreter automatically. I will make a tool length database, and hook it into that, so the current tool length settings will be automatically updated each time the program is loaded.
> > > > > > > >
> > > > > > > > However, on the first part I tried to cut today, I found it losing position on the quill when doing peck drilling. This always occurred on the up-move. After digging into this a bit, I came up with a simple test program that does a short feed move down at F30, then a 200 IPM rapid back up to the start position. It just does this over, and over, and over. When I run this with my app, I get *constant* faults on the quill servo (something I've never seen in 3 years with this machine). When I run it under KMotionCNC, with what *should* be the same settings, I get occasional faults. When I run it under Mach3 (still with the KFlop), I get no faults.
> > > > > > > >
> > > > > > > > Why would I get a different result running my app vs KMotionCNC? Or even Mach3 for that matter? I believe the settings are exactly the same, as follows:
> > > > > > > >
> > > > > > > > X/Y Steps/Inch: 20000
> > > > > > > > X/Y Vel: 200 IPM | 66667 counts/sec
> > > > > > > > X/Y Accel: 25 in/sec^2 | 500000counts/sec^2
> > > > > > > > X/Y Jerk: 2E6
> > > > > > > >
> > > > > > > > Z Steps/Inch: 20320
> > > > > > > > Z Vel: 150 IPM/50800 counts/sec
> > > > > > > > Z Accel: 25 in/sec^2 | 508000 counts/sec*2
> > > > > > > > Z Jerk: 2E6
> > > > > > > >
> > > > > > > > A Steps/Inch: 96000
> > > > > > > > A Vel: 50 IPM | 80000
> > > > > > > > A Accel: 5 in/sec^2 | 480000
> > > > > > > > A Jerk: 2E6
> > > > > > > >
> > > > > > > > Any ideas?
> > > > > > > >
> > > > > > > > One significant difference I noted between running with Mach3 and running with KMotion - I changed the program to be a 100IPM feed down to -0.1, then a rapid back up to 0.0. If I run this under Mach3, the quill moves up and down VERY quickly, probably making 2-3 cycles/second. Under KMotionCNC and my app, the time to complete each down and up cycle is probably 2-3X what it is in Mach3 - completing no more than one cycle per second.
> > > > > > > >
> > > > > > > > Regards,
> > > > > > > > Ray L.
> > > > > > > >
> > > > > > >
> > > > > >
> > > > >
> > > >
> > >
> >
>
|
|
Group: DynoMotion |
Message: 3714 |
From: himykabibble |
Date: 2/3/2012 |
Subject: Re: Can You Verify My Settings? |
Tom,
The commas were a type. What's in my code is:
KMController.WriteLine( "DefineCS = 0 1 2 3 -1 -1" );
This does not work.
Regards,
Ray L.
--- In DynoMotion@yahoogroups.com, Tom Kerekes <tk@...> wrote:
>
> Hi Ray,
> Â
> The DefineCS requires spaces not commas as parameter separators. KFLOP responds with an error message which normally causes the communication to get out of sync and a disconnect. Not sure why it isn't detecting something wrong under .NET.
> Â
> Don't know about the weird Z pulses. Do you get them with your DSP programs disabled?
> Â
> TK
> Â
> Â
>
> From: himykabibble <jagboy@...>
> To: DynoMotion@yahoogroups.com
> Sent: Friday, February 3, 2012 3:15 PM
> Subject: [DynoMotion] Re: Can You Verify My Settings?
>
>
> Â
> Doing DefineCoordSystem() in the DSP works correctly. Doing "WriteLine("DefineCS = 3, 2, 1, 0, -1, -1"); through dotNet in the app does absolutely nothing. The board retains whatever setting was already there.
>
> Swapping the Z and A axis channels with DefineCoordsystem did not alter the problem with the Z axis moving in any way. I don't see how those spurious pulses can be anything but a hardware problem. An RTL bug? Whatever it is, seems like it may factor into the explanation the Z axis acceleration problem.
>
> Regards,
> Ray L.
>
> --- In DynoMotion@yahoogroups.com, "himykabibble" <jagboy@> wrote:
> >
> > Looks like the Gods of Yahoo decided to eat my last message - it never showed up on the forum. I now have two additional problems:
> >
> > 1) DefineCS does not work. Whether I program it in my init, or do it through KMotions console window, no matter what I set, when I do a "DefineCS" in the console window, it ALWAYS returns "0 1 2 3 -1 -1". Also, the help page on CoordMotion makes reference to the "DefineCS6" command, which I assume doesn't actually exist. I was hoping to swap the Z axis with one of the others, and see if problem #2 below follows....
> >
> > 2) While working on the acceleration problem, I happened to notice that every time I move the X, Y or A axis, the Z axis moves slightly. After jogging the X axis between 0.0 and 1.0 about a dozen times, the Z axis was about 1/8" higher than it should be. At the start of ANY move on ANY axis, the Z axis moves (ALWAYS up) a few thou. If I go into KMotion and set the Z axis Step pin (IO12) as an input, the problem goes away completely. I got out my scope, and, sure enough, there is a burst of pulses coming out of IO12 at the start of any move, even when my machine is completely disconnected from the KFlop, leaving only the passive breakout board connected. This is not noise - I am seeing fast-fall, fast-rise, full-amplitude, rail-to-rail pulses, perhaps a few dozen or so. The signal is otherwise quite clean. I swapped in my backup KFlop, and I see exactly the same thing.
> >
> > The hits just keep on comin'....
> >
> > Regards,
> > Ray L.
> >
> > --- In DynoMotion@yahoogroups.com, brad murry <bradodarb@> wrote:
> > >
> > > Debugging in 2010 may or may not be the issue. You need to make sure you are in debug config, your application settings in c# need to allow unmanaged debugging and if you want to debug deeper than the interop you will need to set those c++ projects to mixed mode....
> > >
> > > -Brad Murry
> > > ________________________________
> > > From: himykabibble
> > > Sent: 2/3/2012 12:55 PM
> > > To: DynoMotion@yahoogroups.com
> > > Subject: [DynoMotion] Re: Can You Verify My Settings?
> > >
> > > Brad,
> > >
> > > I've just read back the Interpreter and CoordMotion parameters for all six axes,and they all read back what they should. Where else could this possibly be coming from?
> > >
> > > I've had no luck getting VS2010 Express to let me debug into the DLLs.
> > >
> > > Regards,
> > > Ray L.
> > >
> > > --- In DynoMotion@yahoogroups.com, brad murry <bradodarb@> wrote:
> > > >
> > > > You can check values once you set them, the .net properties do not actually retain data, they merely get and set public members in the c++ code. This means if you set a value and then check it you are reading the values in the underlying libraries. As an added test you can verify values with script commands.
> > > >
> > > > I have played with accels and velocities and it seems to work for me.
> > > >
> > > > -Brad Murry
> > > > ________________________________
> > > > From: Tom Kerekes
> > > > Sent: 2/3/2012 12:11 PM
> > > > To: DynoMotion@yahoogroups.com
> > > > Subject: Re: [DynoMotion] Re: Can You Verify My Settings?
> > > >
> > > > Hi Ray,
> > > >
> > > > I don't see anything wrong. Again the simplest thing would just be to use the debugger to check what Aceleration is actually being used in the Trajectory Planner. If it is wrong, work backwards to find the disconnect. That's the nice thing about having all the source code.
> > > >
> > > > I agree it most likely an issue with the .NET. If you want to post your code I can try to find time to debug it. But I would need everything including the .NET interface you are currently using.
> > > >
> > > > One other possibility might be the feed rate override being set to infinity or something.
> > > >
> > > > Regards
> > > > TK
> > > >
> > > >
> > > >
> > > >
> > > >
> > > > From: himykabibble <jagboy@>
> > > > To: DynoMotion@yahoogroups.com
> > > > Sent: Friday, February 3, 2012 10:25 AM
> > > > Subject: [DynoMotion] Re: Can You Verify My Settings?
> > > >
> > > >
> > > >
> > > > Tom,
> > > >
> > > > I just tried KMotionCNC again, and it is NOT having this problem, which suggests to me I'm either not doing some essential initialization, or there's a bug in dotNet, and it;s not doing the requested initialization correctly. Both my app and KMotionCNC are using the exact same Init.c, so my init code and dotNet appear to me to be the only variables, as the only other thing my app is doing is passing the G-code file to the interpreter.
> > > >
> > > > Am I doing the right init? Am I doing it at the right time???
> > > >
> > > > Kinda smells like the axis parameters are not "taking", since changing acceleration and velocity all over the map makes NO difference in the behavior.
> > > >
> > > > Below is ALL of the init I'm doing in my app, other than loading the Init.c. This is all done when the first connection is established on app startup. If the connection is lost, only Init.c is re-loaded when the connection comes back.
> > > >
> > > > private void InitAxes()
> > > > {
> > > > // Define the axes
> > > > KMAxes = new Dictionary<string, KMotion_dotNet.KM_Axis>();
> > > > KMAxes.Add("XAxis", new KMotion_dotNet.KM_Axis(KMController, 0, "XAxis"));
> > > > KMAxes.Add("YAxis", new KMotion_dotNet.KM_Axis(KMController, 1, "YAxis"));
> > > > KMAxes.Add("ZAxis", new KMotion_dotNet.KM_Axis(KMController, 2, "ZAxis"));
> > > > KMAxes.Add("AAxis", new KMotion_dotNet.KM_Axis(KMController, 3, "AAxis"));
> > > >
> > > > KMController.AxisChannels = KMAxes;
> > > >
> > > > KMController.CoordMotion.Abort();
> > > > KMController.CoordMotion.ClearAbort();
> > > >
> > > > KMController.CoordMotion.MotionParams.CountsPerInchX = StepsPerInchX;
> > > > KMController.CoordMotion.MotionParams.MaxVelX = MaxVelX;
> > > > KMController.CoordMotion.MotionParams.MaxAccelX = AccelX;
> > > > KMController.WriteLine("EnableAxis0");
> > > >
> > > > KMController.CoordMotion.MotionParams.CountsPerInchY = StepsPerInchY;
> > > > KMController.CoordMotion.MotionParams.MaxVelY = MaxVelY;
> > > > KMController.CoordMotion.MotionParams.MaxAccelY = AccelY;
> > > > KMController.WriteLine("EnableAxis1");
> > > >
> > > > KMController.CoordMotion.MotionParams.CountsPerInchZ = StepsPerInchZ;
> > > > KMController.CoordMotion.MotionParams.MaxVelZ = MaxVelZ;
> > > > KMController.CoordMotion.MotionParams.MaxAccelZ = AccelZ;
> > > > KMController.WriteLine("EnableAxis2");
> > > >
> > > > KMController.CoordMotion.MotionParams.CountsPerInchA = StepsPerInchA;
> > > > KMController.CoordMotion.MotionParams.MaxVelA = MaxVelA;
> > > > KMController.CoordMotion.MotionParams.MaxAccelA = AccelA;
> > > > KMController.WriteLine("EnableAxis3");
> > > >
> > > > KMController.WriteLine("DefineCS = 0 1 2 3 -1 -1");
> > > > }
> > > >
> > > > public void InterpreterInit()
> > > > {
> > > > KMController.Interpreter.Interpreter_CoordMotionStraightFeed +=
> > > > new KM_CoordMotionStraightFeedHandler(Interpreter_Interpreter_CoordMotionStraightFeed);
> > > > KMController.Interpreter.Interpreter_CoordMotionStraightTraverse +=
> > > > new KM_CoordMotionStraightTraverseHandler(Interpreter_Interpreter_CoordMotionStraightTraverse);
> > > > KMController.Interpreter.Interpreter_CoordMotionArcFeed +=
> > > > new KM_CoordMotionArcFeedHandler(Interpreter_Interpreter_CoordMotionArcFeed);
> > > > KMController.Interpreter.InterpreterCompleted +=
> > > > new KM_Controller.KM_Interpreter.KM_GCodeInterpreterCompleteHandler(Interpreter_InterpreterCompleted);
> > > > KMController.Interpreter.InterpreterStatusUpdated +=
> > > > new KM_Controller.KM_Interpreter.KM_GCodeInterpreterStatusHandler(Interpreter_InterpreterStatusUpdated);
> > > >
> > > > KMController.Interpreter.MainPathRoot = @"C:\KMotion428";
> > > >
> > > > KMController.Interpreter.CountsPerInchX = StepsPerInchX;
> > > > KMController.Interpreter.MaxVelX = MaxVelX;
> > > > KMController.Interpreter.MaxAccelX = AccelX;
> > > >
> > > > KMController.Interpreter.CountsPerInchY = StepsPerInchY;
> > > > KMController.Interpreter.MaxVelY = MaxVelY;
> > > > KMController.Interpreter.MaxAccelY = AccelY;
> > > >
> > > > KMController.Interpreter.CountsPerInchZ = StepsPerInchZ;
> > > > KMController.Interpreter.MaxVelZ = MaxVelZ;
> > > > KMController.Interpreter.MaxAccelZ = AccelZ;
> > > >
> > > > KMController.Interpreter.CountsPerInchA = StepsPerInchA;
> > > > KMController.Interpreter.MaxVelA = MaxVelA;
> > > > KMController.Interpreter.MaxAccelA = AccelA;
> > > >
> > > > KMController.Interpreter.BreakAngle = 30;
> > > >
> > > > KMController.Interpreter.SetupParams.LengthUnits = KMotion_dotNet.CANON_UNITS.CANON_UNITS_INCHES;
> > > > KMController.Interpreter.SetupParams.X_AxisOffset = 0.0;
> > > > KMController.Interpreter.SetupParams.Y_AxisOffset = 0.0;
> > > > KMController.Interpreter.SetupParams.Z_AxisOffset = 0.0;
> > > >
> > > > KMController.Interpreter.SetupParams.BlockDelete = true;
> > > >
> > > > KMController.Interpreter.SetupParams.RadiusCompSide = KMotion_dotNet.CANON_SIDE.CANON_SIDE_OFF;
> > > > KMController.Interpreter.SetupParams.Cycle_R = 0.0;
> > > > KMController.Interpreter.SetupParams.Cycle_Z = 0.0;
> > > >
> > > > KMController.Interpreter.SetupParams.DistanceMode = KMotion_dotNet.DISTANCE_MODE.MODE_ABSOLUTE;
> > > >
> > > > KMController.Interpreter.SetupParams.FeedMode = 2;
> > > >
> > > > KMController.Interpreter.SetupParams.FloodCoolantOn = false;
> > > > KMController.Interpreter.SetupParams.MistCoolantOn = false;
> > > >
> > > > KMController.Interpreter.SetupParams.CurrentMotionMode = 80;
> > > >
> > > > KMController.Interpreter.SetupParams.WorkPlane = KMotion_dotNet.CANON_PLANE.CANON_PLANE_XY;
> > > >
> > > > KMController.Interpreter.SetupParams.ToolLengthOffsetIndex = 1;
> > > > KMController.Interpreter.SetupParams.RadiusComp = 1;
> > > >
> > > > KMController.Interpreter.SetupParams.SelectedToolSlot = 1;
> > > > KMController.Interpreter.SetupParams.TraverseSpeed = 200;
> > > > KMController.Interpreter.SetupParams.SpindleDirection = KMotion_dotNet.CANON_DIRECTION.CANON_STOPPED;
> > > > KMController.Interpreter.SetupParams.ToolLengthOffset = 0.0;
> > > >
> > > > KMController.Interpreter.SetMcodeAction(3, MCODE_TYPE.M_Action_SetTwoBits, 27, 1, 28, 0, 0, "SpindleCW");
> > > > KMController.Interpreter.SetMcodeAction(4, MCODE_TYPE.M_Action_SetTwoBits, 27, 0, 28, 1, 0, "SpindleCCW");
> > > > KMController.Interpreter.SetMcodeAction(5, MCODE_TYPE.M_Action_SetTwoBits, 27, 0, 28, 0, 0, "SpindleOff");
> > > > KMController.Interpreter.SetMcodeAction(7, MCODE_TYPE.M_Action_Setbit, 3, 1, 0, 0, 0, "MistOn");
> > > > KMController.Interpreter.SetMcodeAction(8, MCODE_TYPE.M_Action_Setbit, 4, 1, 0, 0, 0, "FloodOn");
> > > > KMController.Interpreter.SetMcodeAction(9, MCODE_TYPE.M_Action_SetTwoBits, 3, 0, 4, 0, 0, "CoolantOff");
> > > > KMController.Interpreter.SetMcodeAction(10, MCODE_TYPE.M_Action_Program, 2, 4, 0, 0, 0, @"C:\My KFlop C Programs\KMotionCNC\KMotionCNCSpindlePWM.c");
> > > > KMController.Interpreter.SetMcodeAction(21, MCODE_TYPE.M_Action_Program, 4, 10, 28, 0, 0, @"C:\My KFlop C Programs\KMotionCNC\KMotionCNCMCodeHandler.c");
> > > >
> > > > KMController.Interpreter.InitializeOnExecute = false;
> > > > KMController.Interpreter.InitializeInterpreter();
> > > >
> > > > InterpreterInitialized = true;
> > > >
> > > > RunCommand(@"C:\KMotion428\GCode Programs\Init.nc", "G20 F0 S0 G54", true);
> > > >
> > > > while (InterpreterIsRunning)
> > > > ;
> > > > }
> > > >
> > > > Regards,
> > > > Ray L.
> > > >
> > > > --- In DynoMotion@yahoogroups.com, Tom Kerekes <tk@> wrote:
> > > > >
> > > > > Hi Ray,
> > > > > ÃÆ'ââ¬Å¡
> > > > > Sounds like a bug.ÃÆ'ââ¬Å¡ Is that from your code?ÃÆ'ââ¬Å¡ Maybe some parameter is not being set?ÃÆ'ââ¬Å¡ You will probably have to step into the code to figure it out.ÃÆ'ââ¬Å¡ Otherwise capture the output motion to see what the really acceleration is.
> > > > > ÃÆ'ââ¬Å¡
> > > > > Which connectors are you using.ÃÆ'ââ¬Å¡ You can multiplex the encoder inputs to JP4 and JP6 if that helps.
> > > > > ÃÆ'ââ¬Å¡
> > > > > Regards
> > > > > TK
> > > > >
> > > > >
> > > > > ________________________________
> > > > > From: himykabibble <jagboy@>
> > > > > To: DynoMotion@yahoogroups.com
> > > > > Sent: Friday, February 3, 2012 9:14 AM
> > > > > Subject: [DynoMotion] Re: Can You Verify My Settings?
> > > > >
> > > > >
> > > > > ÃÆ'ââ¬Å¡
> > > > > Just a little more data:
> > > > >
> > > > > I increased velocity to 200 IPM (67733), acceleration to 35 in/sec^2 (700000), and jerk to 2E12, and I get VERY rare faults when running G0s - perhaps one every few hundred cycles. This is perfectly consistent with what I saw when I first setup the system with Mach3. With the 5X reduced settings in my previous post, I still get CONSTANT faults running G1s, even with the Feedrate specified as only 15 IPM. Why is the response to G1s so radically different from G0s?
> > > > >
> > > > > Unfortunately, no easy way to wire encoders in, as I'm using the encoder pins for other things, and I'm not keen on re-wiring just now. But, it seems to me the fact that I can run such aggressive parameters with G0s indicates the servo tuning is not all that far from optimal.
> > > > >
> > > > > Regards,
> > > > > Ray L.
> > > > >
> > > > > --- In DynoMotion@yahoogroups.com, "himykabibble" <jagboy@> wrote:
> > > > > >
> > > > > > Tom,
> > > > > >
> > > > > > I'm stumped here.... If I do:
> > > > > >
> > > > > > G00 Z-0.5
> > > > > > G00 Z0.0
> > > > > >
> > > > > > with acceleration at 25in/sec^2, jerk at 20E6, it will run HUNDREDS of cycles, never skipping a beat. I have . But, if I do:
> > > > > >
> > > > > > G01 Z-0.5 F150
> > > > > > G01 Z0.0
> > > > > >
> > > > > > even with acceleration reduced by a factor of 5 (to 5in/sec^2), and jerk reduced to 2E5, it faults the servo on EVERY move, and the axis never moves! What is going on here?
> > > > > >
> > > > > > This is the same behavior I've been seeing on my knee - where G0s work perfectly, but when I try to jog with the pendant, I can very easily get faults, even at very low speeds. None of the axes on this machine have ever faulted in the past, unless I ran them into an immovable object.
> > > > > >
> > > > > > Regards,
> > > > > > Ray L.
> > > > > >
> > > > > > --- In DynoMotion@yahoogroups.com, "himykabibble" <jagboy@> wrote:
> > > > > > >
> > > > > > > Tom,
> > > > > > >
> > > > > > > The code is the following two lines repeated many time:
> > > > > > >
> > > > > > > G01 Z-0.1 F30
> > > > > > > G00 Z0.0
> > > > > > >
> > > > > > > The velocity and acceleration settings are what I've been using ever since I built the machine over 3 years ago. Never a problem. In fact, it's capable of more, it's just too scary to crank things up any higher.
> > > > > > >
> > > > > > > Can you explain why KMotionCNC would behave differently from my app? That's the one that really makes no sense to me. I can accept that the servo tuning is not perfect (though it's worked perfectly all these years), but I can't understand why KMotionCNC would not exactly duplicate what my app does, unless the settings in my program are wrong.
> > > > > > >
> > > > > > > Regards,
> > > > > > > Ray L.
> > > > > > >
> > > > > > > --- In DynoMotion@yahoogroups.com, Tom Kerekes <tk@> wrote:
> > > > > > > >
> > > > > > > > Hi Ray,
> > > > > > > > ÃÆ'Ã'âââ¬Ã
¡ÃÆ'ââ¬Å¡
> > > > > > > > When you say "200ÃÆ'Ã'âââ¬Ã
¡ÃÆ'ââ¬Å¡ IPM rapid back up" I assume youÃÆ'Ã'âââ¬Ã
¡ÃÆ'ââ¬Å¡ didn't mean to say "rapid" as in G0?ÃÆ'Ã'âââ¬Ã
¡ÃÆ'ââ¬Å¡ It would help to just list the G code.
> > > > > > > > ÃÆ'Ã'âââ¬Ã
¡ÃÆ'ââ¬Å¡
> > > > > > > > All we are using here is the Z axis correct?
> > > > > > > > ÃÆ'Ã'âââ¬Ã
¡ÃÆ'ââ¬Å¡
> > > > > > > > Your settings are pretty aggressive with acceleration of 25 in/sec2.ÃÆ'Ã'âââ¬Ã
¡ÃÆ'ââ¬Å¡ I calculate to move 0.1 inches will only take 0.12 seconds with infinite Jerk (what Mach3 always uses).ÃÆ'Ã'âââ¬Ã
¡ÃÆ'ââ¬Å¡ So that explains why "rapids" with KMotionCNC is slower.ÃÆ'Ã'âââ¬Ã
¡ÃÆ'ââ¬Å¡ With Jerk limit it takes about 0.27 seconds.ÃÆ'Ã'âââ¬Ã
¡ÃÆ'ââ¬Å¡ I often just enter the numbers into the Step Response Screen to visually see the profile.
> > > > > > > > ÃÆ'Ã'âââ¬Ã
¡ÃÆ'ââ¬Å¡
> > > > > > > > But I don't understand why feed moves (infinite Jerk) would be different between Mach3 and KMotionCNC.ÃÆ'Ã'âââ¬Ã
¡ÃÆ'ââ¬Å¡ I would capture and plot the data to see which is correct.
> > > > > > > > ÃÆ'Ã'âââ¬Ã
¡ÃÆ'ââ¬Å¡
> > > > > > > > Yes by all means wire the encoder back to KFLOP to be able to plot the servo performance.
> > > > > > > > ÃÆ'Ã'âââ¬Ã
¡ÃÆ'ââ¬Å¡
> > > > > > > > Regards
> > > > > > > > TKÃÆ'Ã'âââ¬Ã
¡ÃÆ'ââ¬Å¡
> > > > > > > >
> > > > > > > > From: himykabibble <jagboy@>
> > > > > > > > To: DynoMotion@yahoogroups.com
> > > > > > > > Sent: Thursday, February 2, 2012 6:12 PM
> > > > > > > > Subject: [DynoMotion] Can You Verify My Settings?
> > > > > > > >
> > > > > > > >
> > > > > > > > ÃÆ'Ã'âââ¬Ã
¡ÃÆ'ââ¬Å¡
> > > > > > > > Tom,
> > > > > > > >
> > > > > > > > I tried to actually use my machine with my new app today. The good news is the app did nothing unexpected, and I can tell I will really like the UI once it's a bit more polished. One of the things I added last night was I now output the tool table into my G-code, and the G-code loader in my app now finds it, and pushes it into the interpreter automatically. I will make a tool length database, and hook it into that, so the current tool length settings will be automatically updated each time the program is loaded.
> > > > > > > >
> > > > > > > > However, on the first part I tried to cut today, I found it losing position on the quill when doing peck drilling. This always occurred on the up-move. After digging into this a bit, I came up with a simple test program that does a short feed move down at F30, then a 200 IPM rapid back up to the start position. It just does this over, and over, and over. When I run this with my app, I get *constant* faults on the quill servo (something I've never seen in 3 years with this machine). When I run it under KMotionCNC, with what *should* be the same settings, I get occasional faults. When I run it under Mach3 (still with the KFlop), I get no faults.
> > > > > > > >
> > > > > > > > Why would I get a different result running my app vs KMotionCNC? Or even Mach3 for that matter? I believe the settings are exactly the same, as follows:
> > > > > > > >
> > > > > > > > X/Y Steps/Inch: 20000
> > > > > > > > X/Y Vel: 200 IPM | 66667 counts/sec
> > > > > > > > X/Y Accel: 25 in/sec^2 | 500000counts/sec^2
> > > > > > > > X/Y Jerk: 2E6
> > > > > > > >
> > > > > > > > Z Steps/Inch: 20320
> > > > > > > > Z Vel: 150 IPM/50800 counts/sec
> > > > > > > > Z Accel: 25 in/sec^2 | 508000 counts/sec*2
> > > > > > > > Z Jerk: 2E6
> > > > > > > >
> > > > > > > > A Steps/Inch: 96000
> > > > > > > > A Vel: 50 IPM | 80000
> > > > > > > > A Accel: 5 in/sec^2 | 480000
> > > > > > > > A Jerk: 2E6
> > > > > > > >
> > > > > > > > Any ideas?
> > > > > > > >
> > > > > > > > One significant difference I noted between running with Mach3 and running with KMotion - I changed the program to be a 100IPM feed down to -0.1, then a rapid back up to 0.0. If I run this under Mach3, the quill moves up and down VERY quickly, probably making 2-3 cycles/second. Under KMotionCNC and my app, the time to complete each down and up cycle is probably 2-3X what it is in Mach3 - completing no more than one cycle per second.
> > > > > > > >
> > > > > > > > Regards,
> > > > > > > > Ray L.
> > > > > > > >
> > > > > > >
> > > > > >
> > > > >
> > > >
> > >
> >
>
|
|
Group: DynoMotion |
Message: 3715 |
From: himykabibble |
Date: 2/3/2012 |
Subject: Re: Can You Verify My Settings? |
Brad,
"you will need to set those c++ projects to mixed mode...." - Where/how do you do this? Is it a build config setting? Will I be able to debug down into the guts of the DLLs even though they are built with VS2008, and my app is built with VS2010? I've been unsuccessful in moving my app to VS2008 - it doesn't seem to want to play nice with .NET4, only 3.5.
Regards,
Ray L.
--- In DynoMotion@yahoogroups.com, brad murry <bradodarb@...> wrote:
>
> Debugging in 2010 may or may not be the issue. You need to make sure you are in debug config, your application settings in c# need to allow unmanaged debugging and if you want to debug deeper than the interop you will need to set those c++ projects to mixed mode....
>
> -Brad Murry
> ________________________________
> From: himykabibble
> Sent: 2/3/2012 12:55 PM
> To: DynoMotion@yahoogroups.com
> Subject: [DynoMotion] Re: Can You Verify My Settings?
>
> Brad,
>
> I've just read back the Interpreter and CoordMotion parameters for all six axes,and they all read back what they should. Where else could this possibly be coming from?
>
> I've had no luck getting VS2010 Express to let me debug into the DLLs.
>
> Regards,
> Ray L.
>
> --- In DynoMotion@yahoogroups.com, brad murry <bradodarb@> wrote:
> >
> > You can check values once you set them, the .net properties do not actually retain data, they merely get and set public members in the c++ code. This means if you set a value and then check it you are reading the values in the underlying libraries. As an added test you can verify values with script commands.
> >
> > I have played with accels and velocities and it seems to work for me.
> >
> > -Brad Murry
> > ________________________________
> > From: Tom Kerekes
> > Sent: 2/3/2012 12:11 PM
> > To: DynoMotion@yahoogroups.com
> > Subject: Re: [DynoMotion] Re: Can You Verify My Settings?
> >
> > Hi Ray,
> >
> > I don't see anything wrong. Again the simplest thing would just be to use the debugger to check what Aceleration is actually being used in the Trajectory Planner. If it is wrong, work backwards to find the disconnect. That's the nice thing about having all the source code.
> >
> > I agree it most likely an issue with the .NET. If you want to post your code I can try to find time to debug it. But I would need everything including the .NET interface you are currently using.
> >
> > One other possibility might be the feed rate override being set to infinity or something.
> >
> > Regards
> > TK
> >
> >
> >
> >
> >
> > From: himykabibble <jagboy@>
> > To: DynoMotion@yahoogroups.com
> > Sent: Friday, February 3, 2012 10:25 AM
> > Subject: [DynoMotion] Re: Can You Verify My Settings?
> >
> >
> >
> > Tom,
> >
> > I just tried KMotionCNC again, and it is NOT having this problem, which suggests to me I'm either not doing some essential initialization, or there's a bug in dotNet, and it;s not doing the requested initialization correctly. Both my app and KMotionCNC are using the exact same Init.c, so my init code and dotNet appear to me to be the only variables, as the only other thing my app is doing is passing the G-code file to the interpreter.
> >
> > Am I doing the right init? Am I doing it at the right time???
> >
> > Kinda smells like the axis parameters are not "taking", since changing acceleration and velocity all over the map makes NO difference in the behavior.
> >
> > Below is ALL of the init I'm doing in my app, other than loading the Init.c. This is all done when the first connection is established on app startup. If the connection is lost, only Init.c is re-loaded when the connection comes back.
> >
> > private void InitAxes()
> > {
> > // Define the axes
> > KMAxes = new Dictionary<string, KMotion_dotNet.KM_Axis>();
> > KMAxes.Add("XAxis", new KMotion_dotNet.KM_Axis(KMController, 0, "XAxis"));
> > KMAxes.Add("YAxis", new KMotion_dotNet.KM_Axis(KMController, 1, "YAxis"));
> > KMAxes.Add("ZAxis", new KMotion_dotNet.KM_Axis(KMController, 2, "ZAxis"));
> > KMAxes.Add("AAxis", new KMotion_dotNet.KM_Axis(KMController, 3, "AAxis"));
> >
> > KMController.AxisChannels = KMAxes;
> >
> > KMController.CoordMotion.Abort();
> > KMController.CoordMotion.ClearAbort();
> >
> > KMController.CoordMotion.MotionParams.CountsPerInchX = StepsPerInchX;
> > KMController.CoordMotion.MotionParams.MaxVelX = MaxVelX;
> > KMController.CoordMotion.MotionParams.MaxAccelX = AccelX;
> > KMController.WriteLine("EnableAxis0");
> >
> > KMController.CoordMotion.MotionParams.CountsPerInchY = StepsPerInchY;
> > KMController.CoordMotion.MotionParams.MaxVelY = MaxVelY;
> > KMController.CoordMotion.MotionParams.MaxAccelY = AccelY;
> > KMController.WriteLine("EnableAxis1");
> >
> > KMController.CoordMotion.MotionParams.CountsPerInchZ = StepsPerInchZ;
> > KMController.CoordMotion.MotionParams.MaxVelZ = MaxVelZ;
> > KMController.CoordMotion.MotionParams.MaxAccelZ = AccelZ;
> > KMController.WriteLine("EnableAxis2");
> >
> > KMController.CoordMotion.MotionParams.CountsPerInchA = StepsPerInchA;
> > KMController.CoordMotion.MotionParams.MaxVelA = MaxVelA;
> > KMController.CoordMotion.MotionParams.MaxAccelA = AccelA;
> > KMController.WriteLine("EnableAxis3");
> >
> > KMController.WriteLine("DefineCS = 0 1 2 3 -1 -1");
> > }
> >
> > public void InterpreterInit()
> > {
> > KMController.Interpreter.Interpreter_CoordMotionStraightFeed +=
> > new KM_CoordMotionStraightFeedHandler(Interpreter_Interpreter_CoordMotionStraightFeed);
> > KMController.Interpreter.Interpreter_CoordMotionStraightTraverse +=
> > new KM_CoordMotionStraightTraverseHandler(Interpreter_Interpreter_CoordMotionStraightTraverse);
> > KMController.Interpreter.Interpreter_CoordMotionArcFeed +=
> > new KM_CoordMotionArcFeedHandler(Interpreter_Interpreter_CoordMotionArcFeed);
> > KMController.Interpreter.InterpreterCompleted +=
> > new KM_Controller.KM_Interpreter.KM_GCodeInterpreterCompleteHandler(Interpreter_InterpreterCompleted);
> > KMController.Interpreter.InterpreterStatusUpdated +=
> > new KM_Controller.KM_Interpreter.KM_GCodeInterpreterStatusHandler(Interpreter_InterpreterStatusUpdated);
> >
> > KMController.Interpreter.MainPathRoot = @"C:\KMotion428";
> >
> > KMController.Interpreter.CountsPerInchX = StepsPerInchX;
> > KMController.Interpreter.MaxVelX = MaxVelX;
> > KMController.Interpreter.MaxAccelX = AccelX;
> >
> > KMController.Interpreter.CountsPerInchY = StepsPerInchY;
> > KMController.Interpreter.MaxVelY = MaxVelY;
> > KMController.Interpreter.MaxAccelY = AccelY;
> >
> > KMController.Interpreter.CountsPerInchZ = StepsPerInchZ;
> > KMController.Interpreter.MaxVelZ = MaxVelZ;
> > KMController.Interpreter.MaxAccelZ = AccelZ;
> >
> > KMController.Interpreter.CountsPerInchA = StepsPerInchA;
> > KMController.Interpreter.MaxVelA = MaxVelA;
> > KMController.Interpreter.MaxAccelA = AccelA;
> >
> > KMController.Interpreter.BreakAngle = 30;
> >
> > KMController.Interpreter.SetupParams.LengthUnits = KMotion_dotNet.CANON_UNITS.CANON_UNITS_INCHES;
> > KMController.Interpreter.SetupParams.X_AxisOffset = 0.0;
> > KMController.Interpreter.SetupParams.Y_AxisOffset = 0.0;
> > KMController.Interpreter.SetupParams.Z_AxisOffset = 0.0;
> >
> > KMController.Interpreter.SetupParams.BlockDelete = true;
> >
> > KMController.Interpreter.SetupParams.RadiusCompSide = KMotion_dotNet.CANON_SIDE.CANON_SIDE_OFF;
> > KMController.Interpreter.SetupParams.Cycle_R = 0.0;
> > KMController.Interpreter.SetupParams.Cycle_Z = 0.0;
> >
> > KMController.Interpreter.SetupParams.DistanceMode = KMotion_dotNet.DISTANCE_MODE.MODE_ABSOLUTE;
> >
> > KMController.Interpreter.SetupParams.FeedMode = 2;
> >
> > KMController.Interpreter.SetupParams.FloodCoolantOn = false;
> > KMController.Interpreter.SetupParams.MistCoolantOn = false;
> >
> > KMController.Interpreter.SetupParams.CurrentMotionMode = 80;
> >
> > KMController.Interpreter.SetupParams.WorkPlane = KMotion_dotNet.CANON_PLANE.CANON_PLANE_XY;
> >
> > KMController.Interpreter.SetupParams.ToolLengthOffsetIndex = 1;
> > KMController.Interpreter.SetupParams.RadiusComp = 1;
> >
> > KMController.Interpreter.SetupParams.SelectedToolSlot = 1;
> > KMController.Interpreter.SetupParams.TraverseSpeed = 200;
> > KMController.Interpreter.SetupParams.SpindleDirection = KMotion_dotNet.CANON_DIRECTION.CANON_STOPPED;
> > KMController.Interpreter.SetupParams.ToolLengthOffset = 0.0;
> >
> > KMController.Interpreter.SetMcodeAction(3, MCODE_TYPE.M_Action_SetTwoBits, 27, 1, 28, 0, 0, "SpindleCW");
> > KMController.Interpreter.SetMcodeAction(4, MCODE_TYPE.M_Action_SetTwoBits, 27, 0, 28, 1, 0, "SpindleCCW");
> > KMController.Interpreter.SetMcodeAction(5, MCODE_TYPE.M_Action_SetTwoBits, 27, 0, 28, 0, 0, "SpindleOff");
> > KMController.Interpreter.SetMcodeAction(7, MCODE_TYPE.M_Action_Setbit, 3, 1, 0, 0, 0, "MistOn");
> > KMController.Interpreter.SetMcodeAction(8, MCODE_TYPE.M_Action_Setbit, 4, 1, 0, 0, 0, "FloodOn");
> > KMController.Interpreter.SetMcodeAction(9, MCODE_TYPE.M_Action_SetTwoBits, 3, 0, 4, 0, 0, "CoolantOff");
> > KMController.Interpreter.SetMcodeAction(10, MCODE_TYPE.M_Action_Program, 2, 4, 0, 0, 0, @"C:\My KFlop C Programs\KMotionCNC\KMotionCNCSpindlePWM.c");
> > KMController.Interpreter.SetMcodeAction(21, MCODE_TYPE.M_Action_Program, 4, 10, 28, 0, 0, @"C:\My KFlop C Programs\KMotionCNC\KMotionCNCMCodeHandler.c");
> >
> > KMController.Interpreter.InitializeOnExecute = false;
> > KMController.Interpreter.InitializeInterpreter();
> >
> > InterpreterInitialized = true;
> >
> > RunCommand(@"C:\KMotion428\GCode Programs\Init.nc", "G20 F0 S0 G54", true);
> >
> > while (InterpreterIsRunning)
> > ;
> > }
> >
> > Regards,
> > Ray L.
> >
> > --- In DynoMotion@yahoogroups.com, Tom Kerekes <tk@> wrote:
> > >
> > > Hi Ray,
> > > Ãâ
> > > Sounds like a bug.Ãâ Is that from your code?Ãâ Maybe some parameter is not being set?Ãâ You will probably have to step into the code to figure it out.Ãâ Otherwise capture the output motion to see what the really acceleration is.
> > > Ãâ
> > > Which connectors are you using.Ãâ You can multiplex the encoder inputs to JP4 and JP6 if that helps.
> > > Ãâ
> > > Regards
> > > TK
> > >
> > >
> > > ________________________________
> > > From: himykabibble <jagboy@>
> > > To: DynoMotion@yahoogroups.com
> > > Sent: Friday, February 3, 2012 9:14 AM
> > > Subject: [DynoMotion] Re: Can You Verify My Settings?
> > >
> > >
> > > Ãâ
> > > Just a little more data:
> > >
> > > I increased velocity to 200 IPM (67733), acceleration to 35 in/sec^2 (700000), and jerk to 2E12, and I get VERY rare faults when running G0s - perhaps one every few hundred cycles. This is perfectly consistent with what I saw when I first setup the system with Mach3. With the 5X reduced settings in my previous post, I still get CONSTANT faults running G1s, even with the Feedrate specified as only 15 IPM. Why is the response to G1s so radically different from G0s?
> > >
> > > Unfortunately, no easy way to wire encoders in, as I'm using the encoder pins for other things, and I'm not keen on re-wiring just now. But, it seems to me the fact that I can run such aggressive parameters with G0s indicates the servo tuning is not all that far from optimal.
> > >
> > > Regards,
> > > Ray L.
> > >
> > > --- In DynoMotion@yahoogroups.com, "himykabibble" <jagboy@> wrote:
> > > >
> > > > Tom,
> > > >
> > > > I'm stumped here.... If I do:
> > > >
> > > > G00 Z-0.5
> > > > G00 Z0.0
> > > >
> > > > with acceleration at 25in/sec^2, jerk at 20E6, it will run HUNDREDS of cycles, never skipping a beat. I have . But, if I do:
> > > >
> > > > G01 Z-0.5 F150
> > > > G01 Z0.0
> > > >
> > > > even with acceleration reduced by a factor of 5 (to 5in/sec^2), and jerk reduced to 2E5, it faults the servo on EVERY move, and the axis never moves! What is going on here?
> > > >
> > > > This is the same behavior I've been seeing on my knee - where G0s work perfectly, but when I try to jog with the pendant, I can very easily get faults, even at very low speeds. None of the axes on this machine have ever faulted in the past, unless I ran them into an immovable object.
> > > >
> > > > Regards,
> > > > Ray L.
> > > >
> > > > --- In DynoMotion@yahoogroups.com, "himykabibble" <jagboy@> wrote:
> > > > >
> > > > > Tom,
> > > > >
> > > > > The code is the following two lines repeated many time:
> > > > >
> > > > > G01 Z-0.1 F30
> > > > > G00 Z0.0
> > > > >
> > > > > The velocity and acceleration settings are what I've been using ever since I built the machine over 3 years ago. Never a problem. In fact, it's capable of more, it's just too scary to crank things up any higher.
> > > > >
> > > > > Can you explain why KMotionCNC would behave differently from my app? That's the one that really makes no sense to me. I can accept that the servo tuning is not perfect (though it's worked perfectly all these years), but I can't understand why KMotionCNC would not exactly duplicate what my app does, unless the settings in my program are wrong.
> > > > >
> > > > > Regards,
> > > > > Ray L.
> > > > >
> > > > > --- In DynoMotion@yahoogroups.com, Tom Kerekes <tk@> wrote:
> > > > > >
> > > > > > Hi Ray,
> > > > > > ÃÆ'ââ¬Å¡Ãâ
> > > > > > When you say "200ÃÆ'ââ¬Å¡Ãâ IPM rapid back up" I assume youÃÆ'ââ¬Å¡Ãâ didn't mean to say "rapid" as in G0?ÃÆ'ââ¬Å¡Ãâ It would help to just list the G code.
> > > > > > ÃÆ'ââ¬Å¡Ãâ
> > > > > > All we are using here is the Z axis correct?
> > > > > > ÃÆ'ââ¬Å¡Ãâ
> > > > > > Your settings are pretty aggressive with acceleration of 25 in/sec2.ÃÆ'ââ¬Å¡Ãâ I calculate to move 0.1 inches will only take 0.12 seconds with infinite Jerk (what Mach3 always uses).ÃÆ'ââ¬Å¡Ãâ So that explains why "rapids" with KMotionCNC is slower.ÃÆ'ââ¬Å¡Ãâ With Jerk limit it takes about 0.27 seconds.ÃÆ'ââ¬Å¡Ãâ I often just enter the numbers into the Step Response Screen to visually see the profile.
> > > > > > ÃÆ'ââ¬Å¡Ãâ
> > > > > > But I don't understand why feed moves (infinite Jerk) would be different between Mach3 and KMotionCNC.ÃÆ'ââ¬Å¡Ãâ I would capture and plot the data to see which is correct.
> > > > > > ÃÆ'ââ¬Å¡Ãâ
> > > > > > Yes by all means wire the encoder back to KFLOP to be able to plot the servo performance.
> > > > > > ÃÆ'ââ¬Å¡Ãâ
> > > > > > Regards
> > > > > > TKÃÆ'ââ¬Å¡Ãâ
> > > > > >
> > > > > > From: himykabibble <jagboy@>
> > > > > > To: DynoMotion@yahoogroups.com
> > > > > > Sent: Thursday, February 2, 2012 6:12 PM
> > > > > > Subject: [DynoMotion] Can You Verify My Settings?
> > > > > >
> > > > > >
> > > > > > ÃÆ'ââ¬Å¡Ãâ
> > > > > > Tom,
> > > > > >
> > > > > > I tried to actually use my machine with my new app today. The good news is the app did nothing unexpected, and I can tell I will really like the UI once it's a bit more polished. One of the things I added last night was I now output the tool table into my G-code, and the G-code loader in my app now finds it, and pushes it into the interpreter automatically. I will make a tool length database, and hook it into that, so the current tool length settings will be automatically updated each time the program is loaded.
> > > > > >
> > > > > > However, on the first part I tried to cut today, I found it losing position on the quill when doing peck drilling. This always occurred on the up-move. After digging into this a bit, I came up with a simple test program that does a short feed move down at F30, then a 200 IPM rapid back up to the start position. It just does this over, and over, and over. When I run this with my app, I get *constant* faults on the quill servo (something I've never seen in 3 years with this machine). When I run it under KMotionCNC, with what *should* be the same settings, I get occasional faults. When I run it under Mach3 (still with the KFlop), I get no faults.
> > > > > >
> > > > > > Why would I get a different result running my app vs KMotionCNC? Or even Mach3 for that matter? I believe the settings are exactly the same, as follows:
> > > > > >
> > > > > > X/Y Steps/Inch: 20000
> > > > > > X/Y Vel: 200 IPM | 66667 counts/sec
> > > > > > X/Y Accel: 25 in/sec^2 | 500000counts/sec^2
> > > > > > X/Y Jerk: 2E6
> > > > > >
> > > > > > Z Steps/Inch: 20320
> > > > > > Z Vel: 150 IPM/50800 counts/sec
> > > > > > Z Accel: 25 in/sec^2 | 508000 counts/sec*2
> > > > > > Z Jerk: 2E6
> > > > > >
> > > > > > A Steps/Inch: 96000
> > > > > > A Vel: 50 IPM | 80000
> > > > > > A Accel: 5 in/sec^2 | 480000
> > > > > > A Jerk: 2E6
> > > > > >
> > > > > > Any ideas?
> > > > > >
> > > > > > One significant difference I noted between running with Mach3 and running with KMotion - I changed the program to be a 100IPM feed down to -0.1, then a rapid back up to 0.0. If I run this under Mach3, the quill moves up and down VERY quickly, probably making 2-3 cycles/second. Under KMotionCNC and my app, the time to complete each down and up cycle is probably 2-3X what it is in Mach3 - completing no more than one cycle per second.
> > > > > >
> > > > > > Regards,
> > > > > > Ray L.
> > > > > >
> > > > >
> > > >
> > >
> >
>
|
|
Group: DynoMotion |
Message: 3716 |
From: himykabibble |
Date: 2/3/2012 |
Subject: Re: Can You Verify My Settings? |
I'm getting nowhere here.... I think I've set all the right configuration options per a MSFT web page dealing with debugging unmanaged DLLs. I'm trying to debug the DLL, and have it start the application, but when I try to start the debugger, it starts dotNetConsole.exe, even though I set Properties->Debug->StartExternalProgram to point to my app.
--- In DynoMotion@yahoogroups.com, "himykabibble" <jagboy@...> wrote:
>
> Brad,
>
> "you will need to set those c++ projects to mixed mode...." - Where/how do you do this? Is it a build config setting? Will I be able to debug down into the guts of the DLLs even though they are built with VS2008, and my app is built with VS2010? I've been unsuccessful in moving my app to VS2008 - it doesn't seem to want to play nice with .NET4, only 3.5.
>
> Regards,
> Ray L.
>
> --- In DynoMotion@yahoogroups.com, brad murry <bradodarb@> wrote:
> >
> > Debugging in 2010 may or may not be the issue. You need to make sure you are in debug config, your application settings in c# need to allow unmanaged debugging and if you want to debug deeper than the interop you will need to set those c++ projects to mixed mode....
> >
> > -Brad Murry
> > ________________________________
> > From: himykabibble
> > Sent: 2/3/2012 12:55 PM
> > To: DynoMotion@yahoogroups.com
> > Subject: [DynoMotion] Re: Can You Verify My Settings?
> >
> > Brad,
> >
> > I've just read back the Interpreter and CoordMotion parameters for all six axes,and they all read back what they should. Where else could this possibly be coming from?
> >
> > I've had no luck getting VS2010 Express to let me debug into the DLLs.
> >
> > Regards,
> > Ray L.
> >
> > --- In DynoMotion@yahoogroups.com, brad murry <bradodarb@> wrote:
> > >
> > > You can check values once you set them, the .net properties do not actually retain data, they merely get and set public members in the c++ code. This means if you set a value and then check it you are reading the values in the underlying libraries. As an added test you can verify values with script commands.
> > >
> > > I have played with accels and velocities and it seems to work for me.
> > >
> > > -Brad Murry
> > > ________________________________
> > > From: Tom Kerekes
> > > Sent: 2/3/2012 12:11 PM
> > > To: DynoMotion@yahoogroups.com
> > > Subject: Re: [DynoMotion] Re: Can You Verify My Settings?
> > >
> > > Hi Ray,
> > >
> > > I don't see anything wrong. Again the simplest thing would just be to use the debugger to check what Aceleration is actually being used in the Trajectory Planner. If it is wrong, work backwards to find the disconnect. That's the nice thing about having all the source code.
> > >
> > > I agree it most likely an issue with the .NET. If you want to post your code I can try to find time to debug it. But I would need everything including the .NET interface you are currently using.
> > >
> > > One other possibility might be the feed rate override being set to infinity or something.
> > >
> > > Regards
> > > TK
> > >
> > >
> > >
> > >
> > >
> > > From: himykabibble <jagboy@>
> > > To: DynoMotion@yahoogroups.com
> > > Sent: Friday, February 3, 2012 10:25 AM
> > > Subject: [DynoMotion] Re: Can You Verify My Settings?
> > >
> > >
> > >
> > > Tom,
> > >
> > > I just tried KMotionCNC again, and it is NOT having this problem, which suggests to me I'm either not doing some essential initialization, or there's a bug in dotNet, and it;s not doing the requested initialization correctly. Both my app and KMotionCNC are using the exact same Init.c, so my init code and dotNet appear to me to be the only variables, as the only other thing my app is doing is passing the G-code file to the interpreter.
> > >
> > > Am I doing the right init? Am I doing it at the right time???
> > >
> > > Kinda smells like the axis parameters are not "taking", since changing acceleration and velocity all over the map makes NO difference in the behavior.
> > >
> > > Below is ALL of the init I'm doing in my app, other than loading the Init.c. This is all done when the first connection is established on app startup. If the connection is lost, only Init.c is re-loaded when the connection comes back.
> > >
> > > private void InitAxes()
> > > {
> > > // Define the axes
> > > KMAxes = new Dictionary<string, KMotion_dotNet.KM_Axis>();
> > > KMAxes.Add("XAxis", new KMotion_dotNet.KM_Axis(KMController, 0, "XAxis"));
> > > KMAxes.Add("YAxis", new KMotion_dotNet.KM_Axis(KMController, 1, "YAxis"));
> > > KMAxes.Add("ZAxis", new KMotion_dotNet.KM_Axis(KMController, 2, "ZAxis"));
> > > KMAxes.Add("AAxis", new KMotion_dotNet.KM_Axis(KMController, 3, "AAxis"));
> > >
> > > KMController.AxisChannels = KMAxes;
> > >
> > > KMController.CoordMotion.Abort();
> > > KMController.CoordMotion.ClearAbort();
> > >
> > > KMController.CoordMotion.MotionParams.CountsPerInchX = StepsPerInchX;
> > > KMController.CoordMotion.MotionParams.MaxVelX = MaxVelX;
> > > KMController.CoordMotion.MotionParams.MaxAccelX = AccelX;
> > > KMController.WriteLine("EnableAxis0");
> > >
> > > KMController.CoordMotion.MotionParams.CountsPerInchY = StepsPerInchY;
> > > KMController.CoordMotion.MotionParams.MaxVelY = MaxVelY;
> > > KMController.CoordMotion.MotionParams.MaxAccelY = AccelY;
> > > KMController.WriteLine("EnableAxis1");
> > >
> > > KMController.CoordMotion.MotionParams.CountsPerInchZ = StepsPerInchZ;
> > > KMController.CoordMotion.MotionParams.MaxVelZ = MaxVelZ;
> > > KMController.CoordMotion.MotionParams.MaxAccelZ = AccelZ;
> > > KMController.WriteLine("EnableAxis2");
> > >
> > > KMController.CoordMotion.MotionParams.CountsPerInchA = StepsPerInchA;
> > > KMController.CoordMotion.MotionParams.MaxVelA = MaxVelA;
> > > KMController.CoordMotion.MotionParams.MaxAccelA = AccelA;
> > > KMController.WriteLine("EnableAxis3");
> > >
> > > KMController.WriteLine("DefineCS = 0 1 2 3 -1 -1");
> > > }
> > >
> > > public void InterpreterInit()
> > > {
> > > KMController.Interpreter.Interpreter_CoordMotionStraightFeed +=
> > > new KM_CoordMotionStraightFeedHandler(Interpreter_Interpreter_CoordMotionStraightFeed);
> > > KMController.Interpreter.Interpreter_CoordMotionStraightTraverse +=
> > > new KM_CoordMotionStraightTraverseHandler(Interpreter_Interpreter_CoordMotionStraightTraverse);
> > > KMController.Interpreter.Interpreter_CoordMotionArcFeed +=
> > > new KM_CoordMotionArcFeedHandler(Interpreter_Interpreter_CoordMotionArcFeed);
> > > KMController.Interpreter.InterpreterCompleted +=
> > > new KM_Controller.KM_Interpreter.KM_GCodeInterpreterCompleteHandler(Interpreter_InterpreterCompleted);
> > > KMController.Interpreter.InterpreterStatusUpdated +=
> > > new KM_Controller.KM_Interpreter.KM_GCodeInterpreterStatusHandler(Interpreter_InterpreterStatusUpdated);
> > >
> > > KMController.Interpreter.MainPathRoot = @"C:\KMotion428";
> > >
> > > KMController.Interpreter.CountsPerInchX = StepsPerInchX;
> > > KMController.Interpreter.MaxVelX = MaxVelX;
> > > KMController.Interpreter.MaxAccelX = AccelX;
> > >
> > > KMController.Interpreter.CountsPerInchY = StepsPerInchY;
> > > KMController.Interpreter.MaxVelY = MaxVelY;
> > > KMController.Interpreter.MaxAccelY = AccelY;
> > >
> > > KMController.Interpreter.CountsPerInchZ = StepsPerInchZ;
> > > KMController.Interpreter.MaxVelZ = MaxVelZ;
> > > KMController.Interpreter.MaxAccelZ = AccelZ;
> > >
> > > KMController.Interpreter.CountsPerInchA = StepsPerInchA;
> > > KMController.Interpreter.MaxVelA = MaxVelA;
> > > KMController.Interpreter.MaxAccelA = AccelA;
> > >
> > > KMController.Interpreter.BreakAngle = 30;
> > >
> > > KMController.Interpreter.SetupParams.LengthUnits = KMotion_dotNet.CANON_UNITS.CANON_UNITS_INCHES;
> > > KMController.Interpreter.SetupParams.X_AxisOffset = 0.0;
> > > KMController.Interpreter.SetupParams.Y_AxisOffset = 0.0;
> > > KMController.Interpreter.SetupParams.Z_AxisOffset = 0.0;
> > >
> > > KMController.Interpreter.SetupParams.BlockDelete = true;
> > >
> > > KMController.Interpreter.SetupParams.RadiusCompSide = KMotion_dotNet.CANON_SIDE.CANON_SIDE_OFF;
> > > KMController.Interpreter.SetupParams.Cycle_R = 0.0;
> > > KMController.Interpreter.SetupParams.Cycle_Z = 0.0;
> > >
> > > KMController.Interpreter.SetupParams.DistanceMode = KMotion_dotNet.DISTANCE_MODE.MODE_ABSOLUTE;
> > >
> > > KMController.Interpreter.SetupParams.FeedMode = 2;
> > >
> > > KMController.Interpreter.SetupParams.FloodCoolantOn = false;
> > > KMController.Interpreter.SetupParams.MistCoolantOn = false;
> > >
> > > KMController.Interpreter.SetupParams.CurrentMotionMode = 80;
> > >
> > > KMController.Interpreter.SetupParams.WorkPlane = KMotion_dotNet.CANON_PLANE.CANON_PLANE_XY;
> > >
> > > KMController.Interpreter.SetupParams.ToolLengthOffsetIndex = 1;
> > > KMController.Interpreter.SetupParams.RadiusComp = 1;
> > >
> > > KMController.Interpreter.SetupParams.SelectedToolSlot = 1;
> > > KMController.Interpreter.SetupParams.TraverseSpeed = 200;
> > > KMController.Interpreter.SetupParams.SpindleDirection = KMotion_dotNet.CANON_DIRECTION.CANON_STOPPED;
> > > KMController.Interpreter.SetupParams.ToolLengthOffset = 0.0;
> > >
> > > KMController.Interpreter.SetMcodeAction(3, MCODE_TYPE.M_Action_SetTwoBits, 27, 1, 28, 0, 0, "SpindleCW");
> > > KMController.Interpreter.SetMcodeAction(4, MCODE_TYPE.M_Action_SetTwoBits, 27, 0, 28, 1, 0, "SpindleCCW");
> > > KMController.Interpreter.SetMcodeAction(5, MCODE_TYPE.M_Action_SetTwoBits, 27, 0, 28, 0, 0, "SpindleOff");
> > > KMController.Interpreter.SetMcodeAction(7, MCODE_TYPE.M_Action_Setbit, 3, 1, 0, 0, 0, "MistOn");
> > > KMController.Interpreter.SetMcodeAction(8, MCODE_TYPE.M_Action_Setbit, 4, 1, 0, 0, 0, "FloodOn");
> > > KMController.Interpreter.SetMcodeAction(9, MCODE_TYPE.M_Action_SetTwoBits, 3, 0, 4, 0, 0, "CoolantOff");
> > > KMController.Interpreter.SetMcodeAction(10, MCODE_TYPE.M_Action_Program, 2, 4, 0, 0, 0, @"C:\My KFlop C Programs\KMotionCNC\KMotionCNCSpindlePWM.c");
> > > KMController.Interpreter.SetMcodeAction(21, MCODE_TYPE.M_Action_Program, 4, 10, 28, 0, 0, @"C:\My KFlop C Programs\KMotionCNC\KMotionCNCMCodeHandler.c");
> > >
> > > KMController.Interpreter.InitializeOnExecute = false;
> > > KMController.Interpreter.InitializeInterpreter();
> > >
> > > InterpreterInitialized = true;
> > >
> > > RunCommand(@"C:\KMotion428\GCode Programs\Init.nc", "G20 F0 S0 G54", true);
> > >
> > > while (InterpreterIsRunning)
> > > ;
> > > }
> > >
> > > Regards,
> > > Ray L.
> > >
> > > --- In DynoMotion@yahoogroups.com, Tom Kerekes <tk@> wrote:
> > > >
> > > > Hi Ray,
> > > > Ãâ
> > > > Sounds like a bug.Ãâ Is that from your code?Ãâ Maybe some parameter is not being set?Ãâ You will probably have to step into the code to figure it out.Ãâ Otherwise capture the output motion to see what the really acceleration is.
> > > > Ãâ
> > > > Which connectors are you using.Ãâ You can multiplex the encoder inputs to JP4 and JP6 if that helps.
> > > > Ãâ
> > > > Regards
> > > > TK
> > > >
> > > >
> > > > ________________________________
> > > > From: himykabibble <jagboy@>
> > > > To: DynoMotion@yahoogroups.com
> > > > Sent: Friday, February 3, 2012 9:14 AM
> > > > Subject: [DynoMotion] Re: Can You Verify My Settings?
> > > >
> > > >
> > > > Ãâ
> > > > Just a little more data:
> > > >
> > > > I increased velocity to 200 IPM (67733), acceleration to 35 in/sec^2 (700000), and jerk to 2E12, and I get VERY rare faults when running G0s - perhaps one every few hundred cycles. This is perfectly consistent with what I saw when I first setup the system with Mach3. With the 5X reduced settings in my previous post, I still get CONSTANT faults running G1s, even with the Feedrate specified as only 15 IPM. Why is the response to G1s so radically different from G0s?
> > > >
> > > > Unfortunately, no easy way to wire encoders in, as I'm using the encoder pins for other things, and I'm not keen on re-wiring just now. But, it seems to me the fact that I can run such aggressive parameters with G0s indicates the servo tuning is not all that far from optimal.
> > > >
> > > > Regards,
> > > > Ray L.
> > > >
> > > > --- In DynoMotion@yahoogroups.com, "himykabibble" <jagboy@> wrote:
> > > > >
> > > > > Tom,
> > > > >
> > > > > I'm stumped here.... If I do:
> > > > >
> > > > > G00 Z-0.5
> > > > > G00 Z0.0
> > > > >
> > > > > with acceleration at 25in/sec^2, jerk at 20E6, it will run HUNDREDS of cycles, never skipping a beat. I have . But, if I do:
> > > > >
> > > > > G01 Z-0.5 F150
> > > > > G01 Z0.0
> > > > >
> > > > > even with acceleration reduced by a factor of 5 (to 5in/sec^2), and jerk reduced to 2E5, it faults the servo on EVERY move, and the axis never moves! What is going on here?
> > > > >
> > > > > This is the same behavior I've been seeing on my knee - where G0s work perfectly, but when I try to jog with the pendant, I can very easily get faults, even at very low speeds. None of the axes on this machine have ever faulted in the past, unless I ran them into an immovable object.
> > > > >
> > > > > Regards,
> > > > > Ray L.
> > > > >
> > > > > --- In DynoMotion@yahoogroups.com, "himykabibble" <jagboy@> wrote:
> > > > > >
> > > > > > Tom,
> > > > > >
> > > > > > The code is the following two lines repeated many time:
> > > > > >
> > > > > > G01 Z-0.1 F30
> > > > > > G00 Z0.0
> > > > > >
> > > > > > The velocity and acceleration settings are what I've been using ever since I built the machine over 3 years ago. Never a problem. In fact, it's capable of more, it's just too scary to crank things up any higher.
> > > > > >
> > > > > > Can you explain why KMotionCNC would behave differently from my app? That's the one that really makes no sense to me. I can accept that the servo tuning is not perfect (though it's worked perfectly all these years), but I can't understand why KMotionCNC would not exactly duplicate what my app does, unless the settings in my program are wrong.
> > > > > >
> > > > > > Regards,
> > > > > > Ray L.
> > > > > >
> > > > > > --- In DynoMotion@yahoogroups.com, Tom Kerekes <tk@> wrote:
> > > > > > >
> > > > > > > Hi Ray,
> > > > > > > ÃÆ'ââ¬Å¡Ãâ
> > > > > > > When you say "200ÃÆ'ââ¬Å¡Ãâ IPM rapid back up" I assume youÃÆ'ââ¬Å¡Ãâ didn't mean to say "rapid" as in G0?ÃÆ'ââ¬Å¡Ãâ It would help to just list the G code.
> > > > > > > ÃÆ'ââ¬Å¡Ãâ
> > > > > > > All we are using here is the Z axis correct?
> > > > > > > ÃÆ'ââ¬Å¡Ãâ
> > > > > > > Your settings are pretty aggressive with acceleration of 25 in/sec2.ÃÆ'ââ¬Å¡Ãâ I calculate to move 0.1 inches will only take 0.12 seconds with infinite Jerk (what Mach3 always uses).ÃÆ'ââ¬Å¡Ãâ So that explains why "rapids" with KMotionCNC is slower.ÃÆ'ââ¬Å¡Ãâ With Jerk limit it takes about 0.27 seconds.ÃÆ'ââ¬Å¡Ãâ I often just enter the numbers into the Step Response Screen to visually see the profile.
> > > > > > > ÃÆ'ââ¬Å¡Ãâ
> > > > > > > But I don't understand why feed moves (infinite Jerk) would be different between Mach3 and KMotionCNC.ÃÆ'ââ¬Å¡Ãâ I would capture and plot the data to see which is correct.
> > > > > > > ÃÆ'ââ¬Å¡Ãâ
> > > > > > > Yes by all means wire the encoder back to KFLOP to be able to plot the servo performance.
> > > > > > > ÃÆ'ââ¬Å¡Ãâ
> > > > > > > Regards
> > > > > > > TKÃÆ'ââ¬Å¡Ãâ
> > > > > > >
> > > > > > > From: himykabibble <jagboy@>
> > > > > > > To: DynoMotion@yahoogroups.com
> > > > > > > Sent: Thursday, February 2, 2012 6:12 PM
> > > > > > > Subject: [DynoMotion] Can You Verify My Settings?
> > > > > > >
> > > > > > >
> > > > > > > ÃÆ'ââ¬Å¡Ãâ
> > > > > > > Tom,
> > > > > > >
> > > > > > > I tried to actually use my machine with my new app today. The good news is the app did nothing unexpected, and I can tell I will really like the UI once it's a bit more polished. One of the things I added last night was I now output the tool table into my G-code, and the G-code loader in my app now finds it, and pushes it into the interpreter automatically. I will make a tool length database, and hook it into that, so the current tool length settings will be automatically updated each time the program is loaded.
> > > > > > >
> > > > > > > However, on the first part I tried to cut today, I found it losing position on the quill when doing peck drilling. This always occurred on the up-move. After digging into this a bit, I came up with a simple test program that does a short feed move down at F30, then a 200 IPM rapid back up to the start position. It just does this over, and over, and over. When I run this with my app, I get *constant* faults on the quill servo (something I've never seen in 3 years with this machine). When I run it under KMotionCNC, with what *should* be the same settings, I get occasional faults. When I run it under Mach3 (still with the KFlop), I get no faults.
> > > > > > >
> > > > > > > Why would I get a different result running my app vs KMotionCNC? Or even Mach3 for that matter? I believe the settings are exactly the same, as follows:
> > > > > > >
> > > > > > > X/Y Steps/Inch: 20000
> > > > > > > X/Y Vel: 200 IPM | 66667 counts/sec
> > > > > > > X/Y Accel: 25 in/sec^2 | 500000counts/sec^2
> > > > > > > X/Y Jerk: 2E6
> > > > > > >
> > > > > > > Z Steps/Inch: 20320
> > > > > > > Z Vel: 150 IPM/50800 counts/sec
> > > > > > > Z Accel: 25 in/sec^2 | 508000 counts/sec*2
> > > > > > > Z Jerk: 2E6
> > > > > > >
> > > > > > > A Steps/Inch: 96000
> > > > > > > A Vel: 50 IPM | 80000
> > > > > > > A Accel: 5 in/sec^2 | 480000
> > > > > > > A Jerk: 2E6
> > > > > > >
> > > > > > > Any ideas?
> > > > > > >
> > > > > > > One significant difference I noted between running with Mach3 and running with KMotion - I changed the program to be a 100IPM feed down to -0.1, then a rapid back up to 0.0. If I run this under Mach3, the quill moves up and down VERY quickly, probably making 2-3 cycles/second. Under KMotionCNC and my app, the time to complete each down and up cycle is probably 2-3X what it is in Mach3 - completing no more than one cycle per second.
> > > > > > >
> > > > > > > Regards,
> > > > > > > Ray L.
> > > > > > >
> > > > > >
> > > > >
> > > >
> > >
> >
>
|
|
Group: DynoMotion |
Message: 3717 |
From: Tom Kerekes |
Date: 2/3/2012 |
Subject: Re: Can You Verify My Settings? |
Hi Ray,
Is your App set as the Startup Project?
Would you like me to connect in?
Regards
TK
Group: DynoMotion |
Message: 3718 |
From: himykabibble |
Date: 2/3/2012 |
Subject: Re: Can You Verify My Settings? |
Tom,
I don't see how to do that.... It appears to me I have to debug from the DLL, and let it run my app, but I can't get it to do that. I have no idea why it's running dotNetConsole.
I am open to any assistance at this point. Just tell me what to do....
Regards,
Ray L.
--- In DynoMotion@yahoogroups.com, Tom Kerekes <tk@...> wrote:
>
> Hi Ray,
> Â
> Is your App set as the Startup Project?
> Â
> Would you like me to connect in?
> Â
> Regards
> TK
>
> From: himykabibble <jagboy@...>
> To: DynoMotion@yahoogroups.com
> Sent: Friday, February 3, 2012 6:31 PM
> Subject: [DynoMotion] Re: Can You Verify My Settings?
>
>
> Â
> I'm getting nowhere here.... I think I've set all the right configuration options per a MSFT web page dealing with debugging unmanaged DLLs. I'm trying to debug the DLL, and have it start the application, but when I try to start the debugger, it starts dotNetConsole.exe, even though I set Properties->Debug->StartExternalProgram to point to my app.
>
> --- In DynoMotion@yahoogroups.com, "himykabibble" <jagboy@> wrote:
> >
> > Brad,
> >
> > "you will need to set those c++ projects to mixed mode...." - Where/how do you do this? Is it a build config setting? Will I be able to debug down into the guts of the DLLs even though they are built with VS2008, and my app is built with VS2010? I've been unsuccessful in moving my app to VS2008 - it doesn't seem to want to play nice with .NET4, only 3.5.
> >
> > Regards,
> > Ray L.
> >
> > --- In DynoMotion@yahoogroups.com, brad murry <bradodarb@> wrote:
> > >
> > > Debugging in 2010 may or may not be the issue. You need to make sure you are in debug config, your application settings in c# need to allow unmanaged debugging and if you want to debug deeper than the interop you will need to set those c++ projects to mixed mode....
> > >
> > > -Brad Murry
> > > ________________________________
> > > From: himykabibble
> > > Sent: 2/3/2012 12:55 PM
> > > To: DynoMotion@yahoogroups.com
> > > Subject: [DynoMotion] Re: Can You Verify My Settings?
> > >
> > > Brad,
> > >
> > > I've just read back the Interpreter and CoordMotion parameters for all six axes,and they all read back what they should. Where else could this possibly be coming from?
> > >
> > > I've had no luck getting VS2010 Express to let me debug into the DLLs.
> > >
> > > Regards,
> > > Ray L.
> > >
> > > --- In DynoMotion@yahoogroups.com, brad murry <bradodarb@> wrote:
> > > >
> > > > You can check values once you set them, the .net properties do not actually retain data, they merely get and set public members in the c++ code. This means if you set a value and then check it you are reading the values in the underlying libraries. As an added test you can verify values with script commands.
> > > >
> > > > I have played with accels and velocities and it seems to work for me.
> > > >
> > > > -Brad Murry
> > > > ________________________________
> > > > From: Tom Kerekes
> > > > Sent: 2/3/2012 12:11 PM
> > > > To: DynoMotion@yahoogroups.com
> > > > Subject: Re: [DynoMotion] Re: Can You Verify My Settings?
> > > >
> > > > Hi Ray,
> > > >
> > > > I don't see anything wrong. Again the simplest thing would just be to use the debugger to check what Aceleration is actually being used in the Trajectory Planner. If it is wrong, work backwards to find the disconnect. That's the nice thing about having all the source code.
> > > >
> > > > I agree it most likely an issue with the .NET. If you want to post your code I can try to find time to debug it. But I would need everything including the .NET interface you are currently using.
> > > >
> > > > One other possibility might be the feed rate override being set to infinity or something.
> > > >
> > > > Regards
> > > > TK
> > > >
> > > >
> > > >
> > > >
> > > >
> > > > From: himykabibble <jagboy@>
> > > > To: DynoMotion@yahoogroups.com
> > > > Sent: Friday, February 3, 2012 10:25 AM
> > > > Subject: [DynoMotion] Re: Can You Verify My Settings?
> > > >
> > > >
> > > >
> > > > Tom,
> > > >
> > > > I just tried KMotionCNC again, and it is NOT having this problem, which suggests to me I'm either not doing some essential initialization, or there's a bug in dotNet, and it;s not doing the requested initialization correctly. Both my app and KMotionCNC are using the exact same Init.c, so my init code and dotNet appear to me to be the only variables, as the only other thing my app is doing is passing the G-code file to the interpreter.
> > > >
> > > > Am I doing the right init? Am I doing it at the right time???
> > > >
> > > > Kinda smells like the axis parameters are not "taking", since changing acceleration and velocity all over the map makes NO difference in the behavior.
> > > >
> > > > Below is ALL of the init I'm doing in my app, other than loading the Init.c. This is all done when the first connection is established on app startup. If the connection is lost, only Init.c is re-loaded when the connection comes back.
> > > >
> > > > private void InitAxes()
> > > > {
> > > > // Define the axes
> > > > KMAxes = new Dictionary<string, KMotion_dotNet.KM_Axis>();
> > > > KMAxes.Add("XAxis", new KMotion_dotNet.KM_Axis(KMController, 0, "XAxis"));
> > > > KMAxes.Add("YAxis", new KMotion_dotNet.KM_Axis(KMController, 1, "YAxis"));
> > > > KMAxes.Add("ZAxis", new KMotion_dotNet.KM_Axis(KMController, 2, "ZAxis"));
> > > > KMAxes.Add("AAxis", new KMotion_dotNet.KM_Axis(KMController, 3, "AAxis"));
> > > >
> > > > KMController.AxisChannels = KMAxes;
> > > >
> > > > KMController.CoordMotion.Abort();
> > > > KMController.CoordMotion.ClearAbort();
> > > >
> > > > KMController.CoordMotion.MotionParams.CountsPerInchX = StepsPerInchX;
> > > > KMController.CoordMotion.MotionParams.MaxVelX = MaxVelX;
> > > > KMController.CoordMotion.MotionParams.MaxAccelX = AccelX;
> > > > KMController.WriteLine("EnableAxis0");
> > > >
> > > > KMController.CoordMotion.MotionParams.CountsPerInchY = StepsPerInchY;
> > > > KMController.CoordMotion.MotionParams.MaxVelY = MaxVelY;
> > > > KMController.CoordMotion.MotionParams.MaxAccelY = AccelY;
> > > > KMController.WriteLine("EnableAxis1");
> > > >
> > > > KMController.CoordMotion.MotionParams.CountsPerInchZ = StepsPerInchZ;
> > > > KMController.CoordMotion.MotionParams.MaxVelZ = MaxVelZ;
> > > > KMController.CoordMotion.MotionParams.MaxAccelZ = AccelZ;
> > > > KMController.WriteLine("EnableAxis2");
> > > >
> > > > KMController.CoordMotion.MotionParams.CountsPerInchA = StepsPerInchA;
> > > > KMController.CoordMotion.MotionParams.MaxVelA = MaxVelA;
> > > > KMController.CoordMotion.MotionParams.MaxAccelA = AccelA;
> > > > KMController.WriteLine("EnableAxis3");
> > > >
> > > > KMController.WriteLine("DefineCS = 0 1 2 3 -1 -1");
> > > > }
> > > >
> > > > public void InterpreterInit()
> > > > {
> > > > KMController.Interpreter.Interpreter_CoordMotionStraightFeed +=
> > > > new KM_CoordMotionStraightFeedHandler(Interpreter_Interpreter_CoordMotionStraightFeed);
> > > > KMController.Interpreter.Interpreter_CoordMotionStraightTraverse +=
> > > > new KM_CoordMotionStraightTraverseHandler(Interpreter_Interpreter_CoordMotionStraightTraverse);
> > > > KMController.Interpreter.Interpreter_CoordMotionArcFeed +=
> > > > new KM_CoordMotionArcFeedHandler(Interpreter_Interpreter_CoordMotionArcFeed);
> > > > KMController.Interpreter.InterpreterCompleted +=
> > > > new KM_Controller.KM_Interpreter.KM_GCodeInterpreterCompleteHandler(Interpreter_InterpreterCompleted);
> > > > KMController.Interpreter.InterpreterStatusUpdated +=
> > > > new KM_Controller.KM_Interpreter.KM_GCodeInterpreterStatusHandler(Interpreter_InterpreterStatusUpdated);
> > > >
> > > > KMController.Interpreter.MainPathRoot = @"C:\KMotion428";
> > > >
> > > > KMController.Interpreter.CountsPerInchX = StepsPerInchX;
> > > > KMController.Interpreter.MaxVelX = MaxVelX;
> > > > KMController.Interpreter.MaxAccelX = AccelX;
> > > >
> > > > KMController.Interpreter.CountsPerInchY = StepsPerInchY;
> > > > KMController.Interpreter.MaxVelY = MaxVelY;
> > > > KMController.Interpreter.MaxAccelY = AccelY;
> > > >
> > > > KMController.Interpreter.CountsPerInchZ = StepsPerInchZ;
> > > > KMController.Interpreter.MaxVelZ = MaxVelZ;
> > > > KMController.Interpreter.MaxAccelZ = AccelZ;
> > > >
> > > > KMController.Interpreter.CountsPerInchA = StepsPerInchA;
> > > > KMController.Interpreter.MaxVelA = MaxVelA;
> > > > KMController.Interpreter.MaxAccelA = AccelA;
> > > >
> > > > KMController.Interpreter.BreakAngle = 30;
> > > >
> > > > KMController.Interpreter.SetupParams.LengthUnits = KMotion_dotNet.CANON_UNITS.CANON_UNITS_INCHES;
> > > > KMController.Interpreter.SetupParams.X_AxisOffset = 0.0;
> > > > KMController.Interpreter.SetupParams.Y_AxisOffset = 0.0;
> > > > KMController.Interpreter.SetupParams.Z_AxisOffset = 0.0;
> > > >
> > > > KMController.Interpreter.SetupParams.BlockDelete = true;
> > > >
> > > > KMController.Interpreter.SetupParams.RadiusCompSide = KMotion_dotNet.CANON_SIDE.CANON_SIDE_OFF;
> > > > KMController.Interpreter.SetupParams.Cycle_R = 0.0;
> > > > KMController.Interpreter.SetupParams.Cycle_Z = 0.0;
> > > >
> > > > KMController.Interpreter.SetupParams.DistanceMode = KMotion_dotNet.DISTANCE_MODE.MODE_ABSOLUTE;
> > > >
> > > > KMController.Interpreter.SetupParams.FeedMode = 2;
> > > >
> > > > KMController.Interpreter.SetupParams.FloodCoolantOn = false;
> > > > KMController.Interpreter.SetupParams.MistCoolantOn = false;
> > > >
> > > > KMController.Interpreter.SetupParams.CurrentMotionMode = 80;
> > > >
> > > > KMController.Interpreter.SetupParams.WorkPlane = KMotion_dotNet.CANON_PLANE.CANON_PLANE_XY;
> > > >
> > > > KMController.Interpreter.SetupParams.ToolLengthOffsetIndex = 1;
> > > > KMController.Interpreter.SetupParams.RadiusComp = 1;
> > > >
> > > > KMController.Interpreter.SetupParams.SelectedToolSlot = 1;
> > > > KMController.Interpreter.SetupParams.TraverseSpeed = 200;
> > > > KMController.Interpreter.SetupParams.SpindleDirection = KMotion_dotNet.CANON_DIRECTION.CANON_STOPPED;
> > > > KMController.Interpreter.SetupParams.ToolLengthOffset = 0.0;
> > > >
> > > > KMController.Interpreter.SetMcodeAction(3, MCODE_TYPE.M_Action_SetTwoBits, 27, 1, 28, 0, 0, "SpindleCW");
> > > > KMController.Interpreter.SetMcodeAction(4, MCODE_TYPE.M_Action_SetTwoBits, 27, 0, 28, 1, 0, "SpindleCCW");
> > > > KMController.Interpreter.SetMcodeAction(5, MCODE_TYPE.M_Action_SetTwoBits, 27, 0, 28, 0, 0, "SpindleOff");
> > > > KMController.Interpreter.SetMcodeAction(7, MCODE_TYPE.M_Action_Setbit, 3, 1, 0, 0, 0, "MistOn");
> > > > KMController.Interpreter.SetMcodeAction(8, MCODE_TYPE.M_Action_Setbit, 4, 1, 0, 0, 0, "FloodOn");
> > > > KMController.Interpreter.SetMcodeAction(9, MCODE_TYPE.M_Action_SetTwoBits, 3, 0, 4, 0, 0, "CoolantOff");
> > > > KMController.Interpreter.SetMcodeAction(10, MCODE_TYPE.M_Action_Program, 2, 4, 0, 0, 0, @"C:\My KFlop C Programs\KMotionCNC\KMotionCNCSpindlePWM.c");
> > > > KMController.Interpreter.SetMcodeAction(21, MCODE_TYPE.M_Action_Program, 4, 10, 28, 0, 0, @"C:\My KFlop C Programs\KMotionCNC\KMotionCNCMCodeHandler.c");
> > > >
> > > > KMController.Interpreter.InitializeOnExecute = false;
> > > > KMController.Interpreter.InitializeInterpreter();
> > > >
> > > > InterpreterInitialized = true;
> > > >
> > > > RunCommand(@"C:\KMotion428\GCode Programs\Init.nc", "G20 F0 S0 G54", true);
> > > >
> > > > while (InterpreterIsRunning)
> > > > ;
> > > > }
> > > >
> > > > Regards,
> > > > Ray L.
> > > >
> > > > --- In DynoMotion@yahoogroups.com, Tom Kerekes <tk@> wrote:
> > > > >
> > > > > Hi Ray,
> > > > > ÃÆ'ââ¬Å¡
> > > > > Sounds like a bug.ÃÆ'ââ¬Å¡ Is that from your code?ÃÆ'ââ¬Å¡ Maybe some parameter is not being set?ÃÆ'ââ¬Å¡ You will probably have to step into the code to figure it out.ÃÆ'ââ¬Å¡ Otherwise capture the output motion to see what the really acceleration is.
> > > > > ÃÆ'ââ¬Å¡
> > > > > Which connectors are you using.ÃÆ'ââ¬Å¡ You can multiplex the encoder inputs to JP4 and JP6 if that helps.
> > > > > ÃÆ'ââ¬Å¡
> > > > > Regards
> > > > > TK
> > > > >
> > > > >
> > > > > ________________________________
> > > > > From: himykabibble <jagboy@>
> > > > > To: DynoMotion@yahoogroups.com
> > > > > Sent: Friday, February 3, 2012 9:14 AM
> > > > > Subject: [DynoMotion] Re: Can You Verify My Settings?
> > > > >
> > > > >
> > > > > ÃÆ'ââ¬Å¡
> > > > > Just a little more data:
> > > > >
> > > > > I increased velocity to 200 IPM (67733), acceleration to 35 in/sec^2 (700000), and jerk to 2E12, and I get VERY rare faults when running G0s - perhaps one every few hundred cycles. This is perfectly consistent with what I saw when I first setup the system with Mach3. With the 5X reduced settings in my previous post, I still get CONSTANT faults running G1s, even with the Feedrate specified as only 15 IPM. Why is the response to G1s so radically different from G0s?
> > > > >
> > > > > Unfortunately, no easy way to wire encoders in, as I'm using the encoder pins for other things, and I'm not keen on re-wiring just now. But, it seems to me the fact that I can run such aggressive parameters with G0s indicates the servo tuning is not all that far from optimal.
> > > > >
> > > > > Regards,
> > > > > Ray L.
> > > > >
> > > > > --- In DynoMotion@yahoogroups.com, "himykabibble" <jagboy@> wrote:
> > > > > >
> > > > > > Tom,
> > > > > >
> > > > > > I'm stumped here.... If I do:
> > > > > >
> > > > > > G00 Z-0.5
> > > > > > G00 Z0.0
> > > > > >
> > > > > > with acceleration at 25in/sec^2, jerk at 20E6, it will run HUNDREDS of cycles, never skipping a beat. I have . But, if I do:
> > > > > >
> > > > > > G01 Z-0.5 F150
> > > > > > G01 Z0.0
> > > > > >
> > > > > > even with acceleration reduced by a factor of 5 (to 5in/sec^2), and jerk reduced to 2E5, it faults the servo on EVERY move, and the axis never moves! What is going on here?
> > > > > >
> > > > > > This is the same behavior I've been seeing on my knee - where G0s work perfectly, but when I try to jog with the pendant, I can very easily get faults, even at very low speeds. None of the axes on this machine have ever faulted in the past, unless I ran them into an immovable object.
> > > > > >
> > > > > > Regards,
> > > > > > Ray L.
> > > > > >
> > > > > > --- In DynoMotion@yahoogroups.com, "himykabibble" <jagboy@> wrote:
> > > > > > >
> > > > > > > Tom,
> > > > > > >
> > > > > > > The code is the following two lines repeated many time:
> > > > > > >
> > > > > > > G01 Z-0.1 F30
> > > > > > > G00 Z0.0
> > > > > > >
> > > > > > > The velocity and acceleration settings are what I've been using ever since I built the machine over 3 years ago. Never a problem. In fact, it's capable of more, it's just too scary to crank things up any higher.
> > > > > > >
> > > > > > > Can you explain why KMotionCNC would behave differently from my app? That's the one that really makes no sense to me. I can accept that the servo tuning is not perfect (though it's worked perfectly all these years), but I can't understand why KMotionCNC would not exactly duplicate what my app does, unless the settings in my program are wrong.
> > > > > > >
> > > > > > > Regards,
> > > > > > > Ray L.
> > > > > > >
> > > > > > > --- In DynoMotion@yahoogroups.com, Tom Kerekes <tk@> wrote:
> > > > > > > >
> > > > > > > > Hi Ray,
> > > > > > > > ÃÆ'Ã'âââ¬Ã
¡ÃÆ'ââ¬Å¡
> > > > > > > > When you say "200ÃÆ'Ã'âââ¬Ã
¡ÃÆ'ââ¬Å¡ IPM rapid back up" I assume youÃÆ'Ã'âââ¬Ã
¡ÃÆ'ââ¬Å¡ didn't mean to say "rapid" as in G0?ÃÆ'Ã'âââ¬Ã
¡ÃÆ'ââ¬Å¡ It would help to just list the G code.
> > > > > > > > ÃÆ'Ã'âââ¬Ã
¡ÃÆ'ââ¬Å¡
> > > > > > > > All we are using here is the Z axis correct?
> > > > > > > > ÃÆ'Ã'âââ¬Ã
¡ÃÆ'ââ¬Å¡
> > > > > > > > Your settings are pretty aggressive with acceleration of 25 in/sec2.ÃÆ'Ã'âââ¬Ã
¡ÃÆ'ââ¬Å¡ I calculate to move 0.1 inches will only take 0.12 seconds with infinite Jerk (what Mach3 always uses).ÃÆ'Ã'âââ¬Ã
¡ÃÆ'ââ¬Å¡ So that explains why "rapids" with KMotionCNC is slower.ÃÆ'Ã'âââ¬Ã
¡ÃÆ'ââ¬Å¡ With Jerk limit it takes about 0.27 seconds.ÃÆ'Ã'âââ¬Ã
¡ÃÆ'ââ¬Å¡ I often just enter the numbers into the Step Response Screen to visually see the profile.
> > > > > > > > ÃÆ'Ã'âââ¬Ã
¡ÃÆ'ââ¬Å¡
> > > > > > > > But I don't understand why feed moves (infinite Jerk) would be different between Mach3 and KMotionCNC.ÃÆ'Ã'âââ¬Ã
¡ÃÆ'ââ¬Å¡ I would capture and plot the data to see which is correct.
> > > > > > > > ÃÆ'Ã'âââ¬Ã
¡ÃÆ'ââ¬Å¡
> > > > > > > > Yes by all means wire the encoder back to KFLOP to be able to plot the servo performance.
> > > > > > > > ÃÆ'Ã'âââ¬Ã
¡ÃÆ'ââ¬Å¡
> > > > > > > > Regards
> > > > > > > > TKÃÆ'Ã'âââ¬Ã
¡ÃÆ'ââ¬Å¡
> > > > > > > >
> > > > > > > > From: himykabibble <jagboy@>
> > > > > > > > To: DynoMotion@yahoogroups.com
> > > > > > > > Sent: Thursday, February 2, 2012 6:12 PM
> > > > > > > > Subject: [DynoMotion] Can You Verify My Settings?
> > > > > > > >
> > > > > > > >
> > > > > > > > ÃÆ'Ã'âââ¬Ã
¡ÃÆ'ââ¬Å¡
> > > > > > > > Tom,
> > > > > > > >
> > > > > > > > I tried to actually use my machine with my new app today. The good news is the app did nothing unexpected, and I can tell I will really like the UI once it's a bit more polished. One of the things I added last night was I now output the tool table into my G-code, and the G-code loader in my app now finds it, and pushes it into the interpreter automatically. I will make a tool length database, and hook it into that, so the current tool length settings will be automatically updated each time the program is loaded.
> > > > > > > >
> > > > > > > > However, on the first part I tried to cut today, I found it losing position on the quill when doing peck drilling. This always occurred on the up-move. After digging into this a bit, I came up with a simple test program that does a short feed move down at F30, then a 200 IPM rapid back up to the start position. It just does this over, and over, and over. When I run this with my app, I get *constant* faults on the quill servo (something I've never seen in 3 years with this machine). When I run it under KMotionCNC, with what *should* be the same settings, I get occasional faults. When I run it under Mach3 (still with the KFlop), I get no faults.
> > > > > > > >
> > > > > > > > Why would I get a different result running my app vs KMotionCNC? Or even Mach3 for that matter? I believe the settings are exactly the same, as follows:
> > > > > > > >
> > > > > > > > X/Y Steps/Inch: 20000
> > > > > > > > X/Y Vel: 200 IPM | 66667 counts/sec
> > > > > > > > X/Y Accel: 25 in/sec^2 | 500000counts/sec^2
> > > > > > > > X/Y Jerk: 2E6
> > > > > > > >
> > > > > > > > Z Steps/Inch: 20320
> > > > > > > > Z Vel: 150 IPM/50800 counts/sec
> > > > > > > > Z Accel: 25 in/sec^2 | 508000 counts/sec*2
> > > > > > > > Z Jerk: 2E6
> > > > > > > >
> > > > > > > > A Steps/Inch: 96000
> > > > > > > > A Vel: 50 IPM | 80000
> > > > > > > > A Accel: 5 in/sec^2 | 480000
> > > > > > > > A Jerk: 2E6
> > > > > > > >
> > > > > > > > Any ideas?
> > > > > > > >
> > > > > > > > One significant difference I noted between running with Mach3 and running with KMotion - I changed the program to be a 100IPM feed down to -0.1, then a rapid back up to 0.0. If I run this under Mach3, the quill moves up and down VERY quickly, probably making 2-3 cycles/second. Under KMotionCNC and my app, the time to complete each down and up cycle is probably 2-3X what it is in Mach3 - completing no more than one cycle per second.
> > > > > > > >
> > > > > > > > Regards,
> > > > > > > > Ray L.
> > > > > > > >
> > > > > > >
> > > > > >
> > > > >
> > > >
> > >
> >
>
|
|
| | | | | | | | | | | |